2,839 Posted Topics

Member Avatar for saldainis

[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.

Member Avatar for Nick Evan
0
152
Member Avatar for thinkersgroup

[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]

Member Avatar for diafol
-5
110
Member Avatar for singh.sanjana
Member Avatar for avillachandok

Well, good luck [URL="http://www.daniweb.com/forums/announcement8-2.html"]with that[/URL]!

Member Avatar for avillachandok
0
240
Member Avatar for samipa

And there seems to missing a small detail called [icode]int main()[/icode] :icon_wink:

Member Avatar for tkud
1
87
Member Avatar for mobmgg

[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 …

Member Avatar for Nick Evan
-1
83
Member Avatar for Ashe_Aqua

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] …

Member Avatar for Ashe_Aqua
0
71
Member Avatar for tak9

[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 …

Member Avatar for Nick Evan
0
161
Member Avatar for Stefano Mtangoo

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.

Member Avatar for mrnutty
0
354
Member Avatar for Tauren

[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 …

Member Avatar for Ancient Dragon
0
547
Member Avatar for americanfire

What do you mean "most likely ", you didn't try to compile the code yet? What exactly is your question?

Member Avatar for americanfire
0
144
Member Avatar for mybluehair

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

Member Avatar for Nick Evan
0
100
Member Avatar for twalton42

[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.

Member Avatar for Nick Evan
-1
92
Member Avatar for facadie
Member Avatar for Nick Evan
0
96
Member Avatar for mymyzzz
Re: SORT

[URL="http://www.daniweb.com/forums/thread242895.html"]Double thread.[/URL] Closed.

Member Avatar for Nick Evan
0
106
Member Avatar for solitaryy

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 …

Member Avatar for solitaryy
0
278
Member Avatar for yasser87

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.

Member Avatar for Nick Evan
0
158
Member Avatar for gehring

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 …

Member Avatar for Narue
0
819
Member Avatar for asadc

[QUOTE=gerard4143;1063289]Boy something is wrong here...This is the C forum[/QUOTE] Moved.

Member Avatar for javaAddict
0
750
Member Avatar for norbert90
Member Avatar for Thraxus

[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 …

Member Avatar for Nick Evan
0
165
Member Avatar for Web_Sailor

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!

Member Avatar for Web_Sailor
0
69
Member Avatar for asator

[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 …

Member Avatar for Nick Evan
-3
74
Member Avatar for Annettest

Moved & closed due to double thread. Discussion continued [URL="http://www.daniweb.com/forums/post1061701.html#post1061701"]here [/URL]

Member Avatar for Nick Evan
0
239
Member Avatar for paramedic7600

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

Member Avatar for selvabalan
0
238
Member Avatar for Richard V
Member Avatar for grafas7

[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.

Member Avatar for grafas7
0
137
Member Avatar for functionalCode
Member Avatar for lashatt2

[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 …

Member Avatar for Nick Evan
0
83
Member Avatar for grib

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

Member Avatar for Nick Evan
1
133
Member Avatar for sknake

[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 :)

Member Avatar for cwarn23
1
313
Member Avatar for wiselka

[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:

Member Avatar for sknake
0
193
Member Avatar for mrnutty

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]

Member Avatar for Ene Uran
4
113
Member Avatar for halluc1nati0n

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 …

Member Avatar for Dave Sinkula
0
110
Member Avatar for blazted

[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.

Member Avatar for Nick Evan
0
555
Member Avatar for Geekitygeek

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 :)

Member Avatar for Nick Evan
3
947
Member Avatar for carlqt

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]

Member Avatar for ithelp
1
258
Member Avatar for UberJoker

[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, …

Member Avatar for UberJoker
0
115
Member Avatar for The Dude

[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 …

Member Avatar for The Dude
1
130
Member Avatar for Lukezzz

[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 :)

Member Avatar for Nick Evan
0
86
Member Avatar for Johno1943
Member Avatar for jephthah

[QUOTE=jbennet;1052236]not sure about the port etc...[/QUOTE] [URL="http://www.daniweb.com/forums/thread194321.html"]Click[/URL]

Member Avatar for The Dude
2
160
Member Avatar for beatleborg

[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?

Member Avatar for Nick Evan
0
340
Member Avatar for frank_hugo_1100

[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 …

Member Avatar for mbit.dbms
0
288
Member Avatar for nhamyl

[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.

Member Avatar for jonsca
0
141
Member Avatar for caperjack

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 …

Member Avatar for caperjack
0
156
Member Avatar for VernonDozier

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!

Member Avatar for happygeek
1
395
Member Avatar for basma.lm

Downloading books? That doesn't sound very legal to me. Thread closed.

Member Avatar for Nick Evan
0
46
Member Avatar for kiryoku

So what have you done so far? No free homework here. And what language do you intend to use?

Member Avatar for ScottieF
0
292
Member Avatar for duke.tim

[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 …

Member Avatar for Nick Evan
0
261

The End.