C/C++ :: What Settings Has To Be Made To Run Language In Jgrasp
Nov 25, 2012Running c in jgrasp.. i am getting error has gcc not found.
View 4 RepliesRunning c in jgrasp.. i am getting error has gcc not found.
View 4 RepliesI'm trying to make a basic settings text file and I'm wondering why pos_y = strAxisData.find(",", pos_x, strAxisData.length()); returns std::string::npos when pos_y = strAxisData.find(","); works fine ? The settings text file format is:
string strAxisData;
while(finConfig)
{
getline(finConfig, strAxisData);
pos_x = strAxisData.find("=");
if(pos_x != std::string::npos)
}
[code]....
My current idea of how to work with user settings goes like this:
1. Create a class to hold all of the user settings.
2. Use that class to load/save/hold settings in memory.
3. Create an instance of that class once in the entry point of the program (int Main or whatever).
4. Pass, by reference this same class instance around to all of the other classes that need the user settings.
5. Once all other objects deleted, save and then delete the User Settings class.
I created a psuedo-code example below of this. My question is if this is the best way or should I be doing something else. In particular, I am wondering if somehow I can avoid passing the settings class by reference all of the time. Would this be a good case scenario for a "Singleton" type class?
#include <string>
class UserSettings {
private:
std::string SettingOne;
int SettingTwo;
bool SettingThree:
[Code] ....
I want to configure netbeans 7.4 settings for c++.I'm posting here because netbeans forums are close to dead. How to do the following things :-
1) When you create a new project of a 'new application' type, main.cpp is already there with some code. I want that main.cpp to be completely empty when I create a new project.
2) When you compile/build your program and run it, the output is shown in a small log window at the bottom. I want it to be shown like in a black output terminal (console ?) just like in Visual Studio or CodeBlocks. (I have some reasons for not using them instead, so don't bother about me not using them)
3) When you click the green 'Run' icon in the upper toolbar, the project is compiled/build again and then runs afterwards. I want it to just run without compiling. (Compiling/Building should be done by 'Build' icon, just like in CodeBlocks or Visual Studio)
My professor assign me a task to create a manual printer settings, not necessary same as printer setting the important thing to do is to have a combobox. In the combobox that you will see the available installed printers, and one command for print that if going to select one available printer in the combobox. It is possible ?
View 1 Replies View RelatedHere the max sdk plugin is looking at X:projects rather than x:program files (x86)autodeskmaxsdk Inside the autodesk folder, there is a projectsettingspropertysheets subfolder where the plugin is looking for.
Now an error pops up saying it needs X:projectsprojectsettingspropertysheets....How can I fix that?
<Import Project="........ProjectSettingsPropertySheets3dsmax.general.project.settings.props" />
I find it hardcoded / How do I set where visual studio to search the correct property setting files automatically?
I am using VC++ 2005, Multibyte char set. I am getting hex values from stream and i have to show it in respective language.
in below example
char mt[] = { 0x0C, 0x85, 0x0C, 0x86, 0x0C, 0x87,0x0C, 0x88,0x0C, 0x89, 0x0C, 0x8A,0x0C, 0x8B,
0x0c, 0x85 , 0x0c , 0x86 , 0x0c , 0x87 , 0x0c , 0x88 , 0x0c , 0x89 , 0x0c , 0x8a , 0x0c , 0x8b , 0x00 , 0x20,
0x0c, 0x8e , 0x0c , 0x8f , 0x0c , 0x90 , 0x0c , 0x92 , 0x0c , 0x93 , 0x0c , 0x94 , 0x00 , 0x20 , 0x0c , 0x95,
0x0c, 0x96 , 0x0c , 0x97 , 0x0c , 0x98 , 0x0c , 0x99 , 0x00 , 0x20 , 0x0c , 0x9a , 0x0c , 0x9b , 0x0c , 0x9c,
0x0c, 0x9d , 0x0c , 0x9e , 0x00 , 0x20 , 0x0c , 0x9f , 0x0c , 0xa0 , 0x0c , 0xa1 , 0x0c , 0xa2 , 0x0c , 0xa3,
0x00, 0x20 , 0x0c , 0xa4 , 0x0c , 0xa5 , 0x0c , 0xa6 , 0x0c , 0xa7 , 0x0c , 0xa8 , 0x00 , 0x20 , 0x0c , 0xaa,
0x0c, 0xab , 0x0c , 0xac , 0x0c , 0xad , 0x0c , 0xae , 0x00 , 0x20 , 0x0c , 0xaf , 0x0c , 0xb0 , 0x0c , 0xb2,
0x0c, 0xb5 , 0x0c , 0xb6};
How can i convert the mt string to below string?
"ಅಆಇಈಉಊಋ ಎಏಐಒಓಔ ಕಖಗಘಙ ಚಛಜಝಞ ಟಠಡಢಣ ತಥದಧನ ಪಫಬಭಮ ಯರಲವಶ"
To cross check the mt array, If you place the above string to the below link you get mt array [URL] ....
Cant i do it in "Multibyte char set" settings? or should i use Unicode settings.
I have a service that has some settings. As the service is running as a system user, the settings file is located in
C:Windowssystem32configsystemprofileAppDataLocal<PRODUCTNAME><ExecutableName+GUID><VERSION>user.config
Now i want to be able to change some settings at runtime using a normal Winforms App. Is there a good and easy way to change the user.config of a different application directly? I tried with ConfigurationManager but that does not seem to work.
How to configurate color of selected text. I am not sure why, but in Visual C++ it is not displayed as in other programs like notepad, which should be harder color. So I cannot find the selected text. Where can I configurate it or where to search it in desktop theme settings?
View 3 Replies View RelatedI've created a solution who exported Access reports (graphics/tables) to a Word- and a PDF-format. Therefor I use PDFSharp and PDFFocus.
The PDF document is okay. But the Word-document looks good. Only the size of the Word-document, it has to send by e-mail, is much too big (17MB).
I have to open the Word document again to change the PageSettings to be sure, that the page-margins and the print orientation are correct.
using System;
using Microsoft.Office.Interop.Word;
namespace PageSetup {
class TestPageOrientation {
static void Main(string[] args)
[Code] .....
I don't know how it works in the Word-library source. But I've tried WdOrientation.wdOrientPortrait and once I was surprised. I saw this page in Landscape-format.
I think there is something wrong with my document sections, because the documents (with a lot of tables, graphics and a image) is much too big. And that's only after using this method.
So my next question is: How can I shrink the size of this Word document?
And what do I have to do to limit the amount of format-settings in this word-document?
i'm student in computing science , i want to specialize in IT security and the first step i think is to know how to program a virus and understand how it works and how to stop it now i'm just a beginner I look for a way forward , i need some tips where can i begin? What are the basics of IT security? What programming language should I learn?
View 3 Replies View RelatedQ. In context of C language syntax checking, which of the following can be modeled using Finite Automata?
(A) Detecting proper termination of an instruction.
(B) Detecting balance of parentheses.
(C) Detecting initialization of a variable.
(D) None of the above.
I have to communicate between two laptops using USB-to-Serial adapter. I have written 2 programs one for sending and another for receiving. Programs were written in both C and C# programming languages.
Using C language: I am able to successfully communicate using C-Programs mentioned below. But the problem is speed. It takes around 1 hour(60min) for just to pass 150MB. improving the performance of this programs...I also mention some comments along with programs for self understanding.Sender File on laptop with serial port :
Code:
#include <stdio.h>
#include <bios.h>
#include <conio.h>
}
[code]....
The above 4 programs behaves as, sender send a character and receives an ack for every character. I have followed this approach, bcoz other approaches were not working fine (in the sense the complete data is not sent, the amount of data sent is not judgeable, bcoz it will different every tym). when i used this approach it worked fine.
Have a program which given a C source code file, gives back RAW MACHINE CODE, which means it doesn't have to be a executable on his own.
Like:
Given a example function for C:
int stdcall Function(void)
{
return 0;
}
Gives back the Machine Code for the Example Function.
It doesn't need to be actual C code, it can also be like:
type int
return 0
Or also it can be a straight assembly-to-machine-code compiler.
Is there any Library? Or even a external tool I can look into?
If I create a file that looks like this for example,
car 2 4 6 8
truck 1 2 3 4 5 6
plane 4 5 6 7 9
Whenever I go to open it back up like this,
ifstream inputFile;
string line;
inputFile.open("file.txt");
while (inputFile>>line) {
cout << line << endl;
} inputFile.close();
return 0;
}
It displays output like this,
car
2
4
6
8
How can I get it to display like above?
how to open an audio file using c. write a code to open an audio file.
View 2 Replies View RelatedYou are given an integer, perhaps a very long long integer, composed of only the digits 1 and/or 2. You have the ability to change a 1 digit into a 2 and a 2 digit into a 1 and must determine the min. number of changes that you can make resulting in no 2 digits remaining in the number that are in a position(in terms of powers of ten) higher than any 1 digit.
example:
2222212 number of changes:1
1111121 1
2211221 3
1122112 2
no negative numbers.
how to get started. Also I'm not allowed to use anything related to arrays or sorting.
The goal of my program is to convert a decmial number to a binary number.First, the program gets an input to an array of chars, and the function translate_dec_bin converts this array to a decimal number through the strtoul function.The problem is that my program prints the binary number with an additional "0".For exmaple, for the input 1 - the program prints 01 instead of 1, for the input 3 - the program prints 011 instead of 11.
Code:
#include <stdio.h>
#include <stdlib.h>
#define MAX_LEN 20
void translate_dec_bin(char s[]){
char st[sizeof(unsigned)*20] = { 0 };
}
[code]....
I have a problem about compiler.I want to write a simple compiler for a language.
stm -> id := expr
| print expr
| if expr then stm
| while expr do stm
| begin opt_stmts end
[Code] .....
I guess I should create main.c to convert source code.Also,I should create a source.c to write a example program that is relevant with above grammar.
I want to monitor a text file. So far what I have is the program reads and prints the names in the file to standard out. When the program reaches the end of the file, it closes.
I want the program to stay active and continue to print names as they are saved to the text file.
I was toying with FindFirstChangeNotification function, but it seems that returns a handle so I'm back to the drawing board.
I want to make an encapsulated surface class that keeps track of important aspects about a surface. I have it started, except when I test the .onDraw() function, nothing appears on the screen. My Code is below:
#include "NSurface.h"
NSurface::NSurface() {
surface = NULL;
}
NSurface::~NSurface() {
SDL_FreeSurface(surface);
[code]....
why nothing is blitting to the screen when I test that class.onDraw() and SDL_Flip(screen)?
I have a program that reads a text file and then outputs the corresponding transition table according to the regular expression given in the text file. The first line that is read by the code contains the transition table. The subsequent lines of the text files include the strings. I want my code to read the strings in the subsequent lines of the text file and tell me whether the string is accepted or not by the language. Basically, what my code does is that it translates the regular expression to an NFA and then, it translates the NFA to a DFA and then it builds a transition table according to the language.
I have included a special library in my code and I compiled my code from the command line using the following command:
gcc -o lalab lalab.c -lncurses
then, I just run the program like this:
./lalab
Another problem that I have is that my code does not handle the empty transitions, so the program should output a corresponding result when it is fed a regular expression such as a|e. The alphabet of the language is made of {a, b, e} e is the empty transition. The text file that the program reads from includes a regular expression in its first line and strings to be accepted or not in the following lines. Given an input file like this:
(a|b)*a
aaaa
aba
bba
ab
bbb
:frown:
The code should produce an output like this:
yes
yes
yes
yes
no
no
Code:
#include<stdio.h>
#include<conio.h>
#define MAX 20
//=========================================================
struct nfa_state {
int a, b, eps1, eps2;
}NFA[20];
[Code] .....
Program:I have 2 arrays: 1 for the correct answers to a quiz, 1 for the user. I then have a vector to hold the incorrect answers.
It keeps outputting what looks like alt characters, why.
Here is the code:
#include <iostream>
#include <vector>
using namespace std;
int main() {
const char a1[]={'a','d','b','b','c','b','a','b','c','d','a','c','d','b','d','c','c','a','d','b'};
char a2[20];
int i=0;
int incorrect=0;
[code].....
I want to know how to respond to a request made by a mobile application (preferably Android) through a desktop software. So for example if there is a button on the mobile app named 'do something and a user clicks it, I want the desktop software to respond to that request and 'do something
So what I was thinking was to upload a file to a server when the button on the app is clicked and add a timer to the desktop software to connect to the server and read the file and respond accordingly.
Is this how it is usually done or am I going about this the wrong way? Im developing the app in C# (Xamarin) and the desktop software in C# as well.
implementing a game of chess, i was able to easily implement the grid with an 8x8 multidimensional array.but here is the case I need to implement a grid made of hexagons(six sided but in future may be seven sideded or eight may be needed): like a beehive something.
How can such a grid be implemented in c++ taking notes of coordinates and borders and stuff? From where i can start working from? this grid has to be just like the chess grid only we got six sided boxexs instead of four,
a few pointers in building an assembler in C for a 68hc11 micro controller I'm struggling on a way to convert the assembly language in a txt file to s19 format.
View 1 Replies View Related