2,839 Posted Topics
Re: [QUOTE=saldainis;1069069]hi guys, i'm new in c++ programming[/QUOTE] Do you realize that the program you've posted has nothing to do with C++? It's C. | |
Re: [QUOTE=Ezzaral;1065270]Perhaps the OP means "cute" girl? That 'e' can make a lot of difference :)[/QUOTE] Probably an Emo-kid. They like cutting. [attach]12815[/attach] ![]() | |
Re: Would you like to try that again in English? | |
Re: Well, good luck [URL="http://www.daniweb.com/forums/announcement8-2.html"]with that[/URL]! | |
Re: And there seems to missing a small detail called [icode]int main()[/icode] :icon_wink: | |
Re: [QUOTE]How do you for loop into a while loop?? [/quote] [attach]12838[/attach] But on a serious note (in C++ for example): [code=c++] int outer = 0; while (outer < 10){ for (int inner = 0; inner < 10; ++inner){ cout << "outer: " << outer << " inner: " << inner … | |
Re: First of all, replace all your getch() with cin.get(). Your class animal_game has 2 members function, but they're not implemented, so this wont compile because if you say you'll return a value from a function you [B]need[/B] to return a value from a function :) Change your class to [code=cplusplus] … | |
Re: [QUOTE=tak99;1067388]pointless post above, im not taking this class by choice. nor do i care for it. i just want to finish this assignment, and your 2cents was no help.[/QUOTE] So with 'i just want to finish this assignment' you mean : 'i just want [B]YOU[/B] to finish this assignment'? I … | |
Re: An education in programming helps. But most of all: *a lot* of practice. The best thing is to have a job in the C++-field, because you can pick up a lot form co-workers and you'll constantly get new projects which will push the boundaries of your knowledge. | |
Re: [quote] Ok I bought the 2 bookies[/quote] [quote]So do I buy those books or no???[/quote] Well, I guess you already did, didn't you? [quote] And can I use visual c 2005 .NET one to compile? or no?[/quote] Yes you can, download the express-version free from [URL="http://msdn.microsoft.com/vstudio/express/"]here[/URL] . You could also … | |
Re: What do you mean "most likely ", you didn't try to compile the code yet? What exactly is your question? | |
Re: try this: [code] #include <iostream> #include <string> int main () { std::string test = "test 1-2-3"; std::cout << test; }[/code] Note that C++ is case sensitive. string != String | |
Re: [QUOTE=GeekByChoiCe;1064444]you asked this question already here: [url]http://www.daniweb.com/forums/thread241370.html[/url] [/QUOTE] I agree. If you see double threads in the future, you can click the 'flag bad post' link so that a moderator can come along and merge or close the threads. Closed. | |
Re: [URL="http://sourceforge.net/projects/opencv/"]OpenCV[/URL] | |
Re: [URL="http://www.daniweb.com/forums/thread242895.html"]Double thread.[/URL] Closed. | |
Re: I suggest you use getline() to get input from the user. Getline takes in input until a newline (enter) is detected. This is handy in you case, because you need 2 words (first and last name). To erase the element from the vector, you can use the erase method from … | |
Re: From PM: [quote=yasssir87] i want to delete this post [/quote] We don't delete posts here. You can just ignore this thread and mark it as 'solved' to ensure that no-one wasts his/her time on this. | |
Re: Vectors are indeed the way to go. But not with fixed sizes as recommended to you by 'other people'. Here's an example of what I mean: [CODE] #include <vector> #include <iostream> int main(){ std::vector<std::vector<CString> > your2darray; std::vector<CString> row; row.push_back("col 1.1"); row.push_back("col 1.2"); row.push_back("col 1.3"); your2darray.push_back(row); // push 1 row in … | |
Re: [QUOTE=gerard4143;1063289]Boy something is wrong here...This is the C forum[/QUOTE] Moved. | |
Re: [QUOTE=Thraxus;1063693]In case anyone actually followed this, I ended up redoing the code completely. It's longer, but more streamlined. Again, I need lessons in refining my code; however, I'm pretty happy with the result. I'll post the code if anyone is interested. Otherwise, I'll save the Daniweb DB some space.[/QUOTE] Thank … | |
Re: All the thing mentioned by you [I]could[/I] speed up your program. But the main question is: Why are you loading 100 mb of data in your memory? This might be a good time to review your algorithm! | |
Re: [QUOTE=asator;1061712]i cant drop it now ! or i'll have another semester ! cause of these 3 hours ! so no i wont drop it .[/QUOTE] So you haven't got a clue how to solve the problem, but you refuse to drop the course because you think you'll get some free … | |
Re: Moved & closed due to double thread. Discussion continued [URL="http://www.daniweb.com/forums/post1061701.html#post1061701"]here [/URL] | |
Re: This thread is over a year old (as is the other thread you replied to), so the person has probably fixed it allready. ;) And it's not the PSU because then Windows wouldn't start. Regards Niek | |
Re: [QUOTE=grafas7;1060141] but still i dont think i need this one[/QUOTE] Then you're wrong. Looks like the 'perfect' function for a 2d-array. | |
Re: [QUOTE=vb5prgrmr;1060933] Please in the future start your own thread[/QUOTE] I've split the posts from the other thread, but have no clue what the OP is asking, hence the thread-title. In the future, you can click the 'flag bad post' link and a moderator will come along and split the thread … | |
Re: this is wrong: [icode]mi = KM_MI * km; [/icode] "KM_MI" == km per mile. So if you already have km and want to go to miles, you should divide by this number, not multiply: [icode]mi = km / KM_MI ; [/icode] Same error is in your liters->gallons conversion | |
Re: [QUOTE=vegaseat;1044336]If I wouldn't have voted for myself, I would have voted for you![/QUOTE] I can't even vote for myself, because I'm not an option in the poll :) | |
Re: [QUOTE=DdoubleD;1059490]First, change this post to NOT be a snippet because that is not what a SNIPPET is for! Where it asks for "What are you posting?", just use the default: Forum Thread[/QUOTE] I've gone ahead and changed. I couldn't find a question anywhere in there though. :icon_confused: | |
Re: Hmm, I couldn't think of something worse: [CODE=c++]#include <iostream> int main (){char ____ ='c',___[3] ,__=____;{{{{{ std::cout<<++____<<(char)((____&__)+21) <<__<< (char)(____+(7*sizeof(char)));}} }}}____ = 0x6F; __=(char)(sizeof(int) *sizeof(int)*sizeof(int)+50); memcpy(___, "ll", sizeof(char)*sizeof(___));std::cout <<__<<____<<___;} [/CODE] | |
Re: str[80] just means: an array of 80-chars. They just chose 'more then enough' characters. 100 would also be fine, or 30. If you're serious about learning C++, then drop the characterarray as soon as possible. std::strings are the way to go: [code=c++] #include <iostream> #include <string> int main (){ std::string … | |
Re: [QUOTE=mksinghal;1059900] so i give you my code as given link above....[/QUOTE] Stop spamming your website. We understood the first time you linked to it. Double posts were removed. | |
Re: You can't edit your posts 30 minutes after posting. I think the lay-out looks ok, but if you want you can make a new one and PM it to me. I'll replace the text with whatever you send me :) | |
Re: This questions is asked 'bout once a week. Here are some [URL="http://www.daniweb.com/search/search.php?q=thesis"]related topics[/URL] found with the 'search' function. And with a few other keywords: [URL="http://www.daniweb.com/search/search.php?q=Final+year+Project"]click [/URL] | |
Re: [QUOTE=UberJoker;1057205]f you can tell me How i can format the code and post it i will do so. Thanks.[/QUOTE] With a code-beautifier or by hand. You could start with removing all the extra white-lines in the code. What IDE are you using? If you're using Visual, then simply press, ctrl-a, … | |
Re: [QUOTE=nav33n;1050011]Are you a bot ? Or do you/your team copy paste the same thing in all the threads you bump once in a while ?[/QUOTE] The last post by this user had a link in it to some site (and it got snipped). I guess they forgot to put the … | |
Re: [QUOTE=Lukezzz;1057142]Yes the -= seemed to work to decrease it in the same way. Hope it is programatically correct to do so :) [/QUOTE] It is :) | |
Re: [QUOTE=jbennet;1052236]not sure about the port etc...[/QUOTE] [URL="http://www.daniweb.com/forums/thread194321.html"]Click[/URL] | |
Re: [QUOTE=nishant4263;582067] why you are not sending me any reply. iam trying for along time .[/QUOTE] Perhaps because his/her post is 3 years old? | |
Re: [QUOTE=Colin Mac;848692]You could go with ten IR LEDS and ten IR phototransistors and use this simple circuit. [IMG]http://www.reconnsworld.com/ir_ultrasonic/basicirdetectemit.gif[/IMG][/quote] The circuit is good, but I would use a variable resistor for R2, so you can modify the detection-distance. I've used the Sharp GP2D12 a while back in a small project I … | |
Re: [QUOTE=jonsca;1054971] It doesn't really matter _that_ much, but this is more of a C program than a C++ one :)[/QUOTE] Agreed. Moved. | |
Re: The number now only represents "registered members". In the past non-registered users also added to this number (like google-crawlers etc). The difference is this: In the past the line meant "655,245 members. 2000 random connections are currently online" Now the line means "655,245 members. 20 of these members are currently … | |
Re: The problem is that the OP put color-tags in his post. Then Adatapost came along and saw that the post needed code-tags and encased the code (with the color-tags in them!) in code-tags. This resulted in tags-in-tags :) I've edited the post. It should be fine now! | |
Re: Downloading books? That doesn't sound very legal to me. Thread closed. | |
Re: So what have you done so far? No free homework here. And what language do you intend to use? | |
Re: [QUOTE=Narue;1053594][B]>You can also do this: <snip conio.h crap>[/B] You [i]can[/i] do that...but don't teach it to others. Using conio.h is like bumping uglies with a fat chick. A lot of guys might do it, but they don't talk about it. Such is the way with bad programming practices.[/QUOTE] This may … |
The End.