2,839 Posted Topics
Re: What's the purpose of this post? Did you think: "hey, let's ask my question in an even more stupid way and maybe someone will answer it [URL="http://www.daniweb.com/forums/thread204779.html"]this time" [/URL] Why didn't you take Iamthwee's advice and check if strcpy() indeed had too many parameters? (as the compiler is telling you) | |
Re: First show us what you came up with. We won't give help if you show no effort yourself. | |
Re: [QUOTE=adatapost;920786] Use code tags. Source code must be surrounded with code tags. For example, [noparse] [CODE=C++] ... statements.. [/CODE] [/noparse][/QUOTE] You're wrong, it should be: [noparse] [CODE=cplusplus] ... statements.. [/CODE] [/noparse] Here's the difference: [code=c++] #include <iostream> using namespace std; int main(){ cout << "hai!"; } [/code] [code=cplusplus] #include <iostream> … | |
Re: [QUOTE=tux4life;920673]Well, he meant that the OP (= Original Poster = the person who started this thread) is probably never going to come back again.[/QUOTE] Meh. I really hate it when people do that. Especially when I actually put quite a lot of effort in answering their question. Too lazy to … | |
Re: Above code will never work because 'p' is undeclared. Did you mean ptr? ps. Your questionmark-key appears to be broke. You should buy a new keyboard. :icon_wink: [edit] Also [URL="http://www.daniweb.com/forums/misc-explaincode.html"]read this[/URL] before you post code again | |
Re: You could also try asking this in the [URL="http://www.daniweb.com/forums/forum71.html"]game-dev[/URL] forum. Matt Evans will probably know how to solve your problem, but he doesn't come out of the game-dev forum much :) | |
Re: [quote=rookie77;309379] I don't think it's a keyboard problem. [/quote] I do actually. Try another keyboard and if the cursor is still moving back, repost | |
Re: Why on earth would you [I]not[/I] want to see warnings? You know that 99% of the warnings are actually code-errors that the compiler can compile right? | |
Re: [QUOTE=William Hemsworth;913923]It happens to me, sometimes it goes months without sending me notifications too, and suddenly starts again.[/QUOTE] [URL="http://www.daniweb.com/forums/showthread.php?t=67386"]I reported bugs[/URL] in the notifications a few years ago. It was never fixed. I just turned off the notifications and used my usercp. | |
Re: remember that [icode]getch()[/icode] and [icode]getchar()[/icode] are not the same functions... If you [I]did[/I] use getch and kbhit, show some code so we can see what you did wrong. | |
Re: Sure: [code=cpp] while (1) std::cout << "Sniffing..\n"; [/code] But if you want a real answer, you should have a look at [URL="http://www.google.nl/search?hl=nl&q=sniffer+c%2B%2B+code&btnG=Google+zoeken&meta="]google[/URL] (first link for example...) | |
Re: And besides: you can flag a single post instead of a whole thread, so no problem when someone reposts. | |
Re: [QUOTE=siddhant3s;913780] In C++, you cannot create a function which can accept "any number of argument" since it support function overloading.[/QUOTE] I disagree: [code=cplusplus] #include <cstdarg> #include <iostream> using std::cout; class Test{ public: Test(){}; ~Test(){}; void Print(int, ...); void Print(int,int); }; void Test::Print(int a,int b){ cout << a << " " … | |
Re: Delete Turbo C and install some compiler that's from this millennium. Like [URL="http://www.microsoft.com/express/vc/"]Visual Studio C++[/URL] [URL="http://www.codeblocks.org/downloads"]code::blocks[/URL] | |
Re: [QUOTE=ithelp;912747]You are going to fail for sure.[/QUOTE] For once, I actually agree with you :) | |
Re: I auto subscribe to each thread I post in (0 clicks) . I changed the notification in the CP to -none- (one time 4 clicks). Now when I check my usercp, I can see all the threads I have posted in (or started). | |
Re: [URL="http://www.daniweb.com/forums/announcement8-2.html"]No[/URL] | |
| |
Re: [QUOTE=wildgoose;908925]Sorry I meant Visual Studio. (Dev Studio is a nickname for it!)[/QUOTE] Never heard of that one? Anyway: the [I]real[/I] question is: Why would you [I]ever[/I] want to use 2gb (!) of memory? I bet there's a better way to solve your problem then using 2gb of ram | |
Re: [QUOTE=wildgoose;910288]As Vernon Dozler said... [/QUOTE] Vernon Dozler? Haha :icon_smile: [QUOTE=zeus1216gw;910804] formatting is an issue I agree. I worked out last night and it's fine now. [/QUOTE] Two thing could have happened: 1. you 'reformatted' the code and you're still missing a bracket 2. By 'reformatted' you mean 'rewrote' the code. … | |
Re: [QUOTE=tux4life;910713], however I don't know whether you should take this seriously [/QUOTE] Aah, then why not test it ourselfs? [code=cplusplus] #include <iostream> #include <cstdio> #include <windows.h> int main(){ long before = GetTickCount(); for (unsigned i = 0; i < 100000; i++) std::cout << "TEXT"; long coutstring = GetTickCount() - before; … | |
Re: I already answered this in [URL="http://www.daniweb.com/forums/thread197579.html"]your other thread.[/URL] But here goes: [icode]fout.open(s.c_str(),ios::app);[/icode] | |
Re: So why not do what the message says? Change iostream.h to iostream. Also don't forget that "cout" is from the std:: namespace, so either use [icode]std::cout[/icode] or put a [icode]using namespace std;[/icode] at the beginning of your code. also read: [URL="https://www.gidforums.com/t-7458.html"]Void main[/URL] [URL="http://www.daniweb.com/forums/announcement8-3.html"]Code tags[/URL] | |
Re: You could use 2 nested loops: [code=cplusplus] for (int x = 0; x < user_x; x++) { for (int y = 0; x < user_y; y++) { // do stuff } std::cout << '\n'; // next line } [/code] Or you could use one loop and use the remainder operand … | |
Re: [QUOTE=caperjack;909098]f you want one that offers this all in one program ,anti virus, real time spyware and adware protection, personal firewall[/QUOTE] The new avg (8.5) has most of this, but it has slown my computer down enormously. [little off-topic] Anyone else have this issue or is it just time to … | |
Re: It would help if you used [URL="http://www.daniweb.com/forums/misc-explaincode.html"]code-tags[/URL] so we could actually read your code. Also: What microcontroller is this? And post a link to it's datasheet, I'm too lazy to search for it myself ;) | |
Re: change str to [icode]str.c_str()[/icode] The function c_str() converts your std::string to a [icode]const char *[/icode] which is what the constructor of fopen wants. I personally like [icode]std::ofstream(str.c_str())[/icode] better for opening files. | |
Re: And quite frankly, I have found UNICODE to be a pain in the behind, so if I don't have a [i]need[/i] for it (which is the case in 99.9% of my programs), I won't use it :) | |
Re: This : [code] int number; int onumber; number = onumber; char value; cout << "what character do you want to fil the pyramid with? >> "; cin >> value; cout << "\nHow many lines shall the pyramid be? >> "; cin >> number; int i =0; int y = number; … | |
Re: [QUOTE=MosaicFuneral;906933]Why are all these "topic ideal" threads popping up now?! They use to isolated over in the CS section, now they're infiltrating the lounges.[/QUOTE] Some a-hole started a thread [I]outside[/I] the CS-forum about a 'final year topic'', and now all students who are too lazy and/or stupid to come up … | |
Re: [QUOTE=mario20055;906775] when I try to delete the file Windows is telling me that the file is begin used by another program. [code] Note: I don't want my EXE to delete the file..... The USER will be deleting this file. [/code] [/QUOTE] As long as your program is busy with the … | |
Re: Post some code, my psychic powers aren't as good as the used to be | |
Re: Here's a good [URL="http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_linklist.aspx"]starting point[/URL] on linked lists. As csurfer mentioned: try something yourself and post your efforts here to receive more help. | |
Re: [QUOTE=azjherben;906995]and explain select() to me I'd be grateful.[/QUOTE] [URL="http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html#select"]Beej [/URL]is your friend. I can't explain it better then he did. | |
Re: [QUOTE=Ancient Dragon;906218] I'm surprised there are still compilers that produce that warning message. I haven't seen it in more than 15 years.[/QUOTE] I actually see this warning quit often. I compile a lot of stuff for microcontrollers and all those compilers complain about it. Most texteditors put a '\n' after … | |
Re: [QUOTE=BretFelix;628965] I want to sort them by LINES, not individual words. Any thoughts? This is for a school project.[/QUOTE] If you are allowed to use STL functions, you could read a file one line at a time with the getline() function and push them into a vector. The std::sort() function … | |
Re: [QUOTE=TrintiyNoe;904916][CODE]cin<<a;[/CODE] lets say the user enters 'i' if i have a variable i,i want its variable to be displayed[/QUOTE] So you mean: [code=cplusplus] int i = 1; char a; cin >> a; //user enters 'i' [/code] and you want to display '1'? If so -> not possible. You could use … | |
Re: [code=cplusplus] ifstream in("filename"); // in file ofstream out("filename"); // out file [/code] In other words: give more information. What are you trying to do? | |
Re: [QUOTE=Hiroshe;904360]Ahh.. I get it, so when I press Mark as Solved everone gets a point. Thanks:)[/QUOTE] I'd like to add that solved threads in the community center (geek's lounge, feedback etc forums) do not count for your 'solved threads' stat.(and neither does reputation in these forums) Also: If someone replies … | |
Re: [QUOTE=TrintiyNoe;904811]but somebody just did some sort of cool thing strings,i dont know wat,but just it was two lines using istringstream,can anybody explain it to me? [/QUOTE] If the char is always a 'c' you could do something like: [code=cplusplus] string str = ""; stringstream sstr("342c234"); while (getline(sstr, str, 'c')) cout … | |
Re: Change <iostream.h> to <iostream>, that's the standard C++ way. Also delete the line [icode]cin >>passage[/icode]. You're already taking in input with getline(), so no need to do it twice. And also change [icode]int space;[/icode] to [icode]int space = 0;[/icode]. How can your program ++ if it doesn't know the variable's … | |
Re: There's this wonderfull site online recently called 'google'. [URL="http://lmgtfy.com/?q=imagelib+devpaks"]Here's[/URL] how to use it. The first link is what you want. :icon_wink: | |
Re: What do you mean? Find the number of files in a directory? Find the total size of files in a directory? [QUOTE=mathueie;904127]I don't like search a recursive algorithm. [/QUOTE] It would be the algorithm [I]I[/I] would choose anyways. | |
Re: [QUOTE=tomtetlaw;903698]How do I use the VC++/VC# Resource editor?[/QUOTE] You should try the link in your signature. [URL="http://lmgtfy.com/?q=resource+editor+visual+c%2B%2B+tutorial"]All the answers are here [/URL] :D | |
Re: Not sure why you want to delete anything, but counting lines by counting periods is [I]one[/I] way to do it yes. Keep in mind that periods are also used for other purposes like abbreviations and stuff like this >... | |
Re: N.I.E.K.: Networked Individual Engineered for Killing Yup, that's me. | |
Re: [QUOTE=tux4life;904113]I'm wondering whether the OP is still interested in new posts in his thread.[/QUOTE] Not everyone spends every single free minute on a C++ forum like us, so (s)he might still come back. I know: It's hard to comprehend, but I've even heard rumors that there are people who actually … | |
Re: It looks like you're trying to erase something from a list which has no value. So maybe you've declared a list somewhere and forgot to put values in it, but you're still trying to access some (non-existent) element? Without seeing your code, it's kind of a guessing game though. |
The End.