958 Posted Topics
Re: Can't you use a loop instead? You could create a class that grows and manages the value split over vectors, overloads the general math operators you'd need, then stores the values into a file. | |
Re: Rashakil did suggest GNU MP in one of your other posts. Your own small basic version wouldn't be hard either. | |
Re: Well it'll be three years old soon. [QUOTE=nanditta;767668]thanx 4 ur opinion. i ll remember it next tym. well i m new to this . joined sterday only. i jus ve started learning abt C. thought culd help. sorry anyway a small hint ta u, next tym if u culd b … | |
Re: [QUOTE=SyedMuhammadAli;767528]Here goes your code. Its compiled.[/QUOTE] Syed, did you read any-of the rules, before you even posted? | |
Re: If you're desperate for small code, and you're in Windows there's MASM; but that's obviously a very different language from C++. There's also the -s option and -Os, in GCC. The manual: [url]http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/[/url] And a quick primer: [url]http://tfc.duke.free.fr/coding/gcc-en.html[/url] | |
Re: Site rules "CODE TAGS". Few things wrong, no need for [icode]system("pause");[/icode] C++ has it's own input tools, you never close() the file very BAD!, why do you need exit()? [code]ifstream infile; infile.open("file"); if(infile.is_open()) { do stuff here; infile.close(); } else { cout << "Error occured." << endl; } [/code] | |
Re: Open a file, read everything from it. Write everything you read to new file. | |
Re: Have you tried different file attributes and access levels, like just all read, no hidden stuff, etc. | |
Re: Voids don't return, and a well design program IMO should never use exit(). Why would your functions need all these pointers? | |
Re: I'm surprised the filter didn't list this as profanity, when it doesn't even allow the mildest things.... | |
Re: What compiler version? Check limits.h for the max size, and stdint.h to see how they define int64_t. If you don't have stdint.h, you might have an out of date version. Some links you might find interesting: [url="http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options"]Aligning some datatypes, and such.[/url] [url="http://gcc.gnu.org/onlinedocs/gcc/Long-Long.html"]Watch for the return-type(if there's no template).[/url] | |
Re: You don't need to use an emergency bailout like that. If it's member of a class then you could have it set one variable that indicates an error occurred, or didn't find anything. [code]class SearchTools : public MaybeSomeOtherLibTools { private: bool error; bool success; public: int binary(...); bool isError(void); bool … | |
Re: [code] LPSECURITY_ATTRIBUTES attributetag = NULL; string name; for(int i = 0; i < 10; i++) { generator(name); CreateDirectory(name.c_str(), attributetag); ...add files, fill them with junk using generator()... } ... void generator(string &str) { for(int i = 0; i < rand() % 256; i++) { str[i] = rand() % 256; } … | |
Re: By clearing the screen, on most Windows systems [icode]system("cls");[/icode]. Not compatible with a lot of other OSes though. So a loop with newlines might be enough to push the rest out of view. The second question; just record everything to an array of stucts(with output, input, ect.), similar to an … | |
Re: You could just use something like Audacity to record it to .wav, then analyze it. Also what about impedance ratings? How are you receiving it, with a mic or the toy speaker with a hot glued pin trick?: [url]http://www.electronicpeasant.com/projects/springs/springs.html[/url] What API/SDK are you using for sound DirectSound, Audiere, etc? | |
Re: Pain killers that don't make me twitchier than Pillz-e the Squirrel, and a right eye that can focus and doesn't feel like it's about to explode. | |
Re: For bytes use char, or you could shove four bytes an int. Are you familiar with C++ file i/o? | |
Re: Something with a Z80 style processor, maybe a GBC? ;) lol j/k | |
Re: MSDN [URL="http://msdn.microsoft.com/en-us/library/ms674884(VS.85).aspx"]http://msdn.microsoft.com/en-us/library/ms674884(VS.85).aspx[/URL] | |
Re: I think I went blind trying to read all that red and green text on white. | |
Re: Did you even try to Google any of those? | |
Re: To be compatible with browsers, you'd probably have to go beyond C++. | |
Re: I thought this was a slash b joke at first. :D After [icode]getline(cin, string);[/icode] it did nothing, after [icode]cin >> string;[/icode] it crashed. | |
Re: You need code tags.... [noparse][code]....all of that here....[/code][/noparse] site rules. If you're using namespace std, why do you need to declare cin, cout, etc.? When do your loops begin in and end? You need to use brackets to enclose things. You use rand() before you even seed, and... you just … | |
Re: Well for windows the procedure would be: Server [icode]CreateNamedPipe(), ConnectNamedPipe(), ReadFile(pipe handle), flush buffers, disconnect[/icode] Client [icode]CreateFile(with pipe's name), WriteFile() CloseHandle()[/icode] | |
Re: One way would be getline [icode]getline(file, string);[/icode], or using >> [icode]file >> x; file >> y; file whatever;[/icode], if your data is in a fixed format. Why are you using gotos?!... | |
Re: [QUOTE=ninja_gs;758769][COLOR="Red"][/COLOR] [COLOR="pink"]MIND YOUR OWN BIZnesSS[/COLOR] [COLOR="pink"]YOu CreePpy MonkeY Narue.[/COLOR] [/QUOTE] Is there really any reason to explode over this? Calm down, this is just a programming forum, not some political moral debate. | |
Re: "You have been trained well." lmfo, That was pure brilliance. | |
Re: Characters can be easily sorted the way numbers are, since they are numbers. | |
Re: Reading the Amazon lists, the PC is superior because it has Hentai, and more FPSs. | |
Re: I don't like apps on Local Machine, I prefer User. | |
Re: [QUOTE=ninja_gs;754948]1 e:\psgitd~1\finals~1\greatest.cpp iostream.h: No such file or directory[/QUOTE] Because it's [icode]#include <iostream>[/icode] no ".h". | |
Re: That's one reason to a carry gun....it was an attempt at their lives. Here, afterwards, they'd shutdown the whole block, get a swat team, call the BATF, if they felt like it the National Guard or militia of choice, and arrest a bunch of believed conspirators. | |
Re: I've only been on two Vista laptops, mostly to setup the Wi-fi for a couple relatives. I'd say it's about a thousand times better than versions of Windows CE, which will lock-up at the blink of an eye(and they want to use it for medical devices...). So I can't really … | |
Re: Here's some good rules: 1). Don't be retarted. 2). Don't shove it in the pant's waist. 3). Don't buy untrusted "Sat. Night Specials". 4). Don't shoot yourself. 5). No hairpin triggers. 6). Never place finger on trigger, unless you're firing it(that moment). 7). Never leave safety off till ready to … | |
Re: It says it equals [icode]-Page 2 - Geeks' Lounge - Mozilla Firefox[/icode]. | |
Re: Death.FM - nothing like a little(or a lot of) doom, tech death, and general insanity to start the morning. In fact, the Spawn of Possession is boosting the caffeine nicely. | |
Re: I have a sweet EOR trick for flipping cases, but what do you have so far? | |
Re: You're telling it to compare two elements away from the first one, being the third one not the second one. [url]http://www.geocities.com/SiliconValley/Park/3230/x86asm/asml1012.html[/url] | |
Re: Remember to stream for larger things, like music, instead of loading it completely. | |
Re: What is line 10, and 11? main() must be able to return zero, and there really is no file called <iostream.h>, look it up. Is getche() a typo, or do you really need it? Biggest question: is your tab, or space bar broken? You'll never be able to fix something … | |
Re: Then kick your professor in the shins for it. Place the declaration in a header, and link the definitions. | |
Re: If I remember right, chars in scanf() don't need the [icode]&[/icode] before them. Yes, main() should always return zero, and shouldn't you be passing the variables to be modify through the parameters of the functions? edit: Or was it for strings(%s)... | |
Re: Not to be nit-picky, but void really don't have a "return". And since maxInt never really had an input, perhaps there should be two functions since maxInt just checks the comparisons. [code] bool maxInt(int, int, int&) { ...return true if x and y have a diffrence... } void printInt(int x, … | |
Re: You never gave N a size, and don't char array declarations have to be constants? You have the convenience of vectors to use over constant sized arrays. | |
Re: String path can't just be placed in a printf like that, it has to be c-string format: [icode]path.c_str()[/icode] Why not just use cout since everything is taken care of for you, if you're not willing to format it. And you might want to read the forum rules - IMMEDIATELY! Pay … |
The End.