3,892 Posted Topics

Member Avatar for bigben09

[quote=bigben09;317880]ok i am having more problems. when u run the code with a number like 1234567890 it prints out 987654321 and that is fine. but if you enter something like 123456789123456789 it prints out something else. [/quote] That would be attributed to overflow i.e. trying to store a number in …

Member Avatar for ~s.o.s~
0
274
Member Avatar for donaldunca

Post your code so that we can atleast point out the mistakes you are making...

Member Avatar for donaldunca
0
231
Member Avatar for n.aggel

Why not use the first ENUM set for the second selection also ? Either that or prefix the ENUM names with an abbreviation of their purpose. Something like: [code=c] enum MenuOne { MO_FIRST = 1, MO_SECOND } ; enum MenuTwo { MT_FIRST = 1, MT_SECOND } ;[/code]

Member Avatar for n.aggel
0
324
Member Avatar for g.prabu

Maximum number of columns in a table or view is 1000. Read [URL="http://ora-01792.ora-code.com/"]this.[/URL]

Member Avatar for kramero
0
159
Member Avatar for boujibabe

You are getting incorrect output since you fail to reset the attempts value to 5 again i.e. at the end of the nested do while loop, set the value of attempts again to 5. Also it is better to decrement the value of attempts at the end of the second …

Member Avatar for boujibabe
0
279
Member Avatar for unclepauly

[quote=Ancient Dragon;316936]Another method is to make static all the methods and objects that the static method needs to access.[/quote] But I guess that would beat the purpose of designing class for creating objects since each object created would have the same thing inside of it (the member variables being static).

Member Avatar for thekashyap
0
233
Member Avatar for |Norman|

Looks like a moderator / supermod / admin deleted that thread by mistake.

Member Avatar for happygeek
0
98
Member Avatar for SHWOO

The program looks good. Mind posting the line numbers and the exact errors you are getting.

Member Avatar for iamthwee
0
249
Member Avatar for dalton

Since you are using C++ already, why not do something simple like: [code=cplusplus] // Not tested #include <fstream> #include <string> int main () { using namespace std ; string my_str ; const char search[] = "model=" ; size_t size = strlen (search) ; size_t pos = 0 ; ifstream in …

Member Avatar for iamthwee
0
806
Member Avatar for Marks256

Keep in mind the quote "Different tool for different tasks". You can't replace the screwdriver just because you think the hammer is cool. It also depends on why you are learning the language. Many people learn new langauges for research work. If this is the case then VB, C# and …

Member Avatar for Marks256
0
410
Member Avatar for eXceed69

Hey there eXceed, welcome to Daniweb. :D We are looking forward to overflow your knowledge base... ;)

Member Avatar for mattyd
0
106
Member Avatar for blink26
Member Avatar for mattyd
0
74
Member Avatar for Duki

A simplistic way with the minimalistic error checking would be: [code=cplusplus] #include <iostream> #include <string> int main () { using namespace std ; const char allowed_chars[] = "0123456789" ; string my_var ; int num = 0 ; cout << "Enter the account number: " ; cin >> my_var ; getchar …

Member Avatar for WaltP
0
304
Member Avatar for Dani

Hmm.. so was it the number of round trips made to the database or a logic problem ?

Member Avatar for Dani
0
171
Member Avatar for tinie

Just do:[code=c] v [2][5] = 9999 ;[/code] to insert value at a specific location in the vector. Vectors are almost like arrays except that they are a bit more robust along with a host of features.

Member Avatar for tinie
1
5K
Member Avatar for lotsofsloths

A algorithm for the game can be found [URL="http://www.geocities.com/stoneeeb/codes/toecode.html"]here[/URL] though not in C but still will serve its purpose of pointing you in the right direction.

Member Avatar for Lazaro Claiborn
0
321
Member Avatar for Dv8oR
Member Avatar for bestquality
Member Avatar for happygeek
0
35
Member Avatar for ReDeViL

This is because you are assigning [I]p[/I] the address of a variable [I]k [/I]which is local to the function [I]changep [/I]and hence [I]k [/I]loses its existence (goes out of scope) as soon as the function exits.

Member Avatar for ~s.o.s~
0
228
Member Avatar for mattyd

Watching TV is kind of a time killer. I agree with Infarction, even I don't seem to be needing the Idiot box... ;)

Member Avatar for jbennet
0
122
Member Avatar for nadith_cs

It depends on what kind of requirement is behind the rounding but you can do something like :[code=c] x = floor (0.23) ; // 0 x = floor (0.90) ; // 0 [/code]

Member Avatar for iamthwee
0
112
Member Avatar for kobi

[quote=joeprogrammer;314434]Except that the statement isn't in the least bit portable... Much better alternative: [code]cin.get();[/code][/quote] That not being the point since the code is already using Windows specific functions (windows.h). A good reason not to write [INLINECODE]system("pause")[/INLINECODE] would be because it spawns a seperate process and troubles the OS since its …

Member Avatar for Ancient Dragon
0
393
Member Avatar for MidiMagic

Daniweb uses a sprinkling of AJAX here and there and with AJAX the back button really loses its original meaning. Try navigating the site using the drop down list at the top rather than hitting back button multiple times.....

Member Avatar for MidiMagic
0
124
Member Avatar for andy257

[quote=andy257;315813]One of my learning programs is a simple calculator.[/quote]Though doable, doing this in C or C++ requires expertise or atleast a firm understanding of the concepts. This is the very reason RAD languages like C# and VB exist, to ease the task of GUI rich application development. If you still …

Member Avatar for ~s.o.s~
0
143
Member Avatar for Mrclean8586
Member Avatar for John A

[quote=joeprogrammer;315460]As many of you probably already know, yesterday DaniWeb received a massive amount of spam threads. I want to thank the moderators for deleting all the spam; it makes me really grateful that we have them here. However would DaniWeb manage without the "flag bad post" link? ;)[/quote] Yay, I …

Member Avatar for ~s.o.s~
1
83
Member Avatar for whipaway

[quote=happygeek;315683]You should install a cybercafe in there as well, or at the very least a WiFi hotspot and then advertise DaniWeb on the back of all tickets, membership cards, coffee mugs etc :)[/quote] Now this is what I would call imagination.... ;) BTW Miss Dani, best of luck with your …

Member Avatar for Dani
0
269
Member Avatar for Tauren

[quote=Tauren;314021]Haha Just expressing my feelings that's all[/quote]Different forums exist for a reason.... Thread moved to the Software developers' Lounge.

Member Avatar for jbennet
-1
90
Member Avatar for degamer106
Member Avatar for Matt Tacular

Why try to reinvent the wheel when you can do something like.... [code=cplusplus] int main ( ) { using namespace std ; string my ; const char* const valid_char = "01" ; bool valid = true ; cout << "Please enter a string: " ; cin >> my ; getchar( …

Member Avatar for Matt Tacular
0
89
Member Avatar for chubbywubba

[URL="http://www.adrianxw.dk/SoftwareSite/Consoles/Consoles6.html"]This[/URL] would be more than enough to get you started..

Member Avatar for ~s.o.s~
0
75
Member Avatar for jella_flores

Hello there, welcome to Daniweb... :D Oh and btw, did you say assembly...*shudders* ;)

Member Avatar for happygeek
0
30
Member Avatar for Lilleman

Hey there buddy, welcome to Daniweb.. :D Oh and btw, happy debugging... ;)

Member Avatar for happygeek
0
28
Member Avatar for raydogg57

Your last for loop is off by one -- running from 0 to 10 where it should have gone from 0 to 9. As far as sorting is concerned, something like t[URL="http://www.daniweb.com/techtalkforums/post108709-6.html"]his[/URL] might be worth reading to see if it serves your purpose....

Member Avatar for WaltP
0
553
Member Avatar for blackjack

Either using : [code=c] const char* ptr = param ; // or char* ptr = const_cast<char*> (param) ; [/code] But it would be interesting to know what you are trying to achieve here.....

Member Avatar for John A
0
115
Member Avatar for iaaan

It seems that you have declared searchnum as a C style string or a null terminated string. If you want to compare C style strings, you can't do it using the not equal to operator. You need to use the function [search]strcmp[/search] function which returns 0 when the two strings …

Member Avatar for iaaan
0
96
Member Avatar for Birhane

Show some effort on your part by pasting the code you have so far got here...

Member Avatar for pty
0
56
Member Avatar for Dortz

Hmmm...have heard that some generous and kind person who goes by the name of Blud is giving out free copies of Vista. Hey there buddy, how are you, hope you are doing fine...nowwww, where is my copy of Vista ;)

Member Avatar for jbennet
0
329
Member Avatar for SHWOO

Since you are calling the function of the object (ie the member function) you don't need to pass anything to the function, since the object contains all that is needed to sort its elements. Just don't forget to update the length of the internal list and it should be fine. …

Member Avatar for SHWOO
-1
200
Member Avatar for The Dude

Nice one, though would be a nightmare for those who have vision problems....

Member Avatar for WaltP
0
78
Member Avatar for mattyd

From the poll 90% of the people who have voted think that Valentine day sucks big time....

Member Avatar for mattyd
0
291
Member Avatar for WhYuLoOkIn

Just a minor point, better use ++variable instead of using variable++. If done so prevents the creation of a temporary variable. This is a normal hack used by all programmers. • Pre-increment(++a) - Increment the value of variable and then use it. • Post-increment (a++) - Use the value of …

Member Avatar for WhYuLoOkIn
0
94
Member Avatar for Matt Tacular

....except that changing the language is not the topic under discussion here. Btw there is a plethora of interpreted / compiled langauges out there which provide the same ease of use, so I guess Ruby isn't that spectacular after all....

Member Avatar for ~s.o.s~
0
92
Member Avatar for Aia

@Aia You really need to cut down the commenting a bit -- its overwhelming. With practice you will surely come to know when the documentation is getting out of hand -- your code is almost 50 % documentation and that too sprinkled throughout the code which makes it difficult to …

Member Avatar for Aia
0
276
Member Avatar for John A

[quote=joeprogrammer;311378]The new line numbers inserted when using syntax coloring code tags is causing me problems when copying and pasting code. [/quote] Click on the link "toggle plain text" which appears below the code snippet and then try copy-pasting. It works out to be fine.

Member Avatar for MidiMagic
0
366
Member Avatar for Rickenbacker360

Maybe [URL="http://www.daniweb.com/techtalkforums/post311548-4.html"]this[/URL] would interest you...

Member Avatar for vegaseat
0
230
Member Avatar for Tauren

[quote=Tauren;312644]Why thankyou joe! And colleges anyone know for art texturing!?[/quote] [URL="http://www.digipen.edu/"]This[/URL] and [URL="http://guildhall.smu.edu/"]this[/URL].

Member Avatar for ~s.o.s~
0
495
Member Avatar for aphridyte

Hello there girly, welcome to Daniweb.. :D If you have a lot to learn, we have to lot to share.... ;)

Member Avatar for happygeek
0
91
Member Avatar for joparga

Hello my friend, I have requested this thread to be moved to the appropriate forum so that you can get maximum help. And btw, welcome to Daniweb. :D

Member Avatar for joparga
0
66
Member Avatar for JOEYBOY

Welcome to Daniweb my friend :D You will find a lot of people of your age here....;)

Member Avatar for happygeek
0
29

The End.