15,300 Posted Topics

Member Avatar for emilio

You can correct the problem like this: [icode]if ( flag == 0 && (s[i] == '+' || s[i] == '-' ))[/icode]

Member Avatar for Ancient Dragon
0
115
Member Avatar for enuff4life

line 18 doesn't work anyway. you can't assign c-style arrays like that, but use strcpy() to do it. Do it like Salem suggested and you can just simply delete lines 17 and 18.

Member Avatar for Ancient Dragon
0
79
Member Avatar for enuff4life

1. functions can not return arrays like you are trying to do. A better solution is to pass a pointer to the array as a parameter so that the function can populate it, like this: [icode] void LongLongToString(long long num, char* string) [/icode] 2. The entire algorighm for that function …

Member Avatar for Ancient Dragon
0
137
Member Avatar for The Dude

[quote="wikipedia"] Hoe may refer to: Hoe (tool), a hand tool used in gardening Hoe (dish), a Korean dish of raw fish Plymouth Hoe A prostitute (slang) [/quote] Sorry, but the Korean's need to rename that fish dish too because it might offend some hores.

Member Avatar for Lardmeister
0
70
Member Avatar for jrice528

If you enter [b]prime 7[/b] as the command-line argument then the word [b]prime[/b] will be in argv[1] and '7' is in argv[2], making argc == 3, not 2. argv[0] is almost always the name of the executable program.

Member Avatar for Duoas
0
115
Member Avatar for Ancient Dragon

This is not my work -- don't know the author. [URL="http://www.stltoday.com/forums/viewtopic.php?t=500862&postdays=0&postorder=asc&&start=8"]This[/URL] is where I got it from though. Also found it [URL="http://www.thejokeyard.com/religious_jokes/priest_sipping_vodka.html"]here[/URL] [quote] Sipping Vodka... A new priest at his first mass was so nervous he could hardly speak. After mass he asked the Monsignor how he had done.. The …

Member Avatar for bumsfeld
0
98
Member Avatar for The Dude

That was funny :) :) The guy with the lighter could have gotten some very serious burns with that dumb trick.

Member Avatar for hbk619
0
94
Member Avatar for The Dude

I don't get the point of it, unless its that children imitate adults. And I suspect most adults know that anyway.

Member Avatar for bumsfeld
0
113
Member Avatar for The Dude
Member Avatar for LanierWexford
Member Avatar for The Dude

I didn't take that test because no point in me doing that -- I get lost driving around the block :)

Member Avatar for bumsfeld
0
34
Member Avatar for rxylion

[QUOTE=Salem;475114]He probably figures that it's better than "Hey nerds, do my homework".[/QUOTE] I like that title better than the original because its more meaningful

Member Avatar for Ancient Dragon
0
124
Member Avatar for amnajvd

you don't program the ports directly but use the installed device drivers. Most common method is to use [URL="http://www.beej.us/guide/bgnet/"]sockets[/URL].

Member Avatar for Ancient Dragon
0
327
Member Avatar for heav_yduty

read the articles at [url]www.codeproject.com[/url] Enter [b]CHTMLView[/b] in their search engine and you will get a list of several articles that explain how to use that MFC class.

Member Avatar for heav_yduty
0
73
Member Avatar for joceyn226

If I comment out lines 49-52 because you didn't post those functions your program works ok for me.

Member Avatar for Ancient Dragon
0
98
Member Avatar for Biro

the [b]const[/b] keyword tells the compiler that the variable will never ever be changed. Since you expect to enter value for [b]user_height[/b] then it cannot be declared [b]const[/b]. Same with the other variables.

Member Avatar for Ancient Dragon
1
104
Member Avatar for eman resu

>>so the size of the executable may well be a consideration. The size of the executables is not relevent as long as you make sure the computers have sufficient RAM and hard drive space. If the programs are having memory problems then its probably due to some faulty programming, not …

Member Avatar for Ancient Dragon
0
102
Member Avatar for teddyzhai

The default copy constructor does only minimal thigs -- it is not sufficnet for most classes that contain objects of complex types such as pointers and container classes.

Member Avatar for Duoas
0
144
Member Avatar for scru
Member Avatar for scru
0
122
Member Avatar for bumsfeld

[QUOTE=Lardmeister;469159]. It is also illegal to buy/sell/drink beer near a church .[/QUOTE] Apparently that's ok where I live. There is a town about 25 miles from where I live there is a popular bar about 100 feet from the church. Raise hell on saturday night then go to confession on …

Member Avatar for Lardmeister
0
246
Member Avatar for MNDGAM
Member Avatar for vmanes
0
104
Member Avatar for rajdeep.mm
Member Avatar for Ancient Dragon
0
66
Member Avatar for tumstech

>>how do i tell my compiler to use the 32 bit address as a flat address and not as (base:segment). You don't >>have a program in which i would like to hardcode the address greater than 1MB, after enabling A20, and ask the compiler to use all the pointers that …

Member Avatar for Salem
0
157
Member Avatar for DamiLeon

>>but it does not work properly when I check the string length Just add code to call strlen() to get the password length the check if it is <= 9. If you really wrote all that code you posted you should have no problem checking for length.

Member Avatar for wambooman
0
84
Member Avatar for uonsin

Assuming you are writing a C console program then use the system() function. MS-DOS has been dead on PCs for 10+ years now, but still used in some old embedded systems.

Member Avatar for uonsin
0
97
Member Avatar for rajdeep.mm

You might check with Sybase to see if you can get a version of the library in the language of your choice. They also have free online support forums where you might ask your question.

Member Avatar for Ancient Dragon
0
29
Member Avatar for jrice528

just create a loop that counts from lower_bounds to upper_bounds, and check the value of the loop counter if it is a prime number or not.

Member Avatar for Ancient Dragon
0
144
Member Avatar for n.aggel

>>it isn't the best thing to mix io functions from different families but scanf() and fgets() are of the same family of functions, all declared in stdio.h But it is NOT good to use scanf() for string input because it can (potentially) corrupt and possibly crash your program if you …

Member Avatar for iamthwee
1
325
Member Avatar for jrice528

Your description of the problem doesn't make sense. First you say to initialize all elements of the array to 1. That's simple enough to do. [code] for (int i = 0; i < arraySize; i++) a[i] = 1; [/code] >>Starting with array subscript 2, every time an array element is …

Member Avatar for jrice528
0
110
Member Avatar for Jishnu

I just tried it with VC++ 2005 Express and TC (the original I think, dated 1989). Neither compiler had the problem you report.

Member Avatar for WaltP
0
98
Member Avatar for mosullivan
Member Avatar for lasher511

OMG [sarcasm]You all are just jealous that you didn't get the Nobel Peace Price like Al Gore did the other day :) [/sarcasm]

Member Avatar for hopalongcassidy
1
832
Member Avatar for DREAMER546

enum getuser1(){ <<< wrong [icode]User1 getuser1() [/icode] <<< right Are you REQUIRED to use enums in this assignment? If not then it would probably be easier just to use const int for each [code] const int stone = 1; const int paper = 2; const int scissors = 3; ... …

Member Avatar for DREAMER546
0
114
Member Avatar for jwenting
Member Avatar for c++ prog

You can not use atoi() because it returns an int which is probably too small to hold 20 digits. But you can use a 64-bit integer to hold the number and convert the string yourself. >> char c[20] ; Too small to hold 20 digits, you didn't leave room the …

Member Avatar for Lerner
0
128
Member Avatar for Suspishio

I installed XP 64 on my computer once, and removed it about an hour later because nothing worked. It's now sitting in some garbage dump.

Member Avatar for Suspishio
0
102
Member Avatar for ArrogantLegend

line 36: delete the [b]endl[/b] from that line because it doesn't go with cin. But because [b]i[/b] is an int you will probably have to flush the '\n' from the keybord buffer, so add [icode]cin.ignore()[/icode] after line 36 and before line 37. line 37: delete this because there is no …

Member Avatar for zippie
0
146
Member Avatar for twomers

If you'd use IE7 on Vista you wouldn't have to worry about those annoying popups. I never get popups (well almost never) unless I click a link to allow them for the current site, including DaniWeb.

Member Avatar for jwenting
0
113
Member Avatar for ithelp

Contrary to popular belief living humans can not communicate with the dead, either now or sometime in the future. There is no such thing as a ghost. Why? Probably because Heaven does not contain people in human form. After I'm dead I'll try to post something here to let you …

Member Avatar for MidiMagic
0
162
Member Avatar for dsuh06

strcat() concantinates strings, not single characters. you can do a simple assignment for that [code] char s2[MAX] = {0}; for(int i=0; i < MAX ; i++) { if (line[i]=='\0') break; if ( line[i] != ' ') s2[i] = line[i]; } [/code] The above will fix the syntax error but not …

Member Avatar for Ancient Dragon
0
126
Member Avatar for joshua.tilson

[QUOTE=joshua.tilson;472636]is there some where i can find out about the diferent 's? i know \n and \r now, what other ones are there? [/QUOTE] [URL="http://www.space.unibe.ch/comp_doc/c_manual/C/FUNCTIONS/escape.html"]here[/URL] >>I am also working on the user input problem, will update every one once i figure something I would create another thread and put the …

Member Avatar for Duoas
0
343
Member Avatar for kano

[QUOTE=Salem;473612]Dunno, there's been half a dozen or so trolls all posting verbatim copies of wikipedia and other online resources, often in repeated replies to their own messages. The management should conduct a ban and sweep on them.[/QUOTE] already did that :)

Member Avatar for Ancient Dragon
0
373
Member Avatar for asilter

>>Could you give some link? Certainly. Logical place is [URL="http://www.google.com/search?hl=en&q=mysql"]mysql site[/URL]? I believe they also have a users group or forum you can join to ask specific questions about mysql.

Member Avatar for Ancient Dragon
0
82
Member Avatar for g_loughnan
Member Avatar for spidey

The two problems may be related. Don't know the cause or solution. I'd first do full scan for virus with an antivirus scanner then anti-spyware program. If no problems there use one of the many programs that check registry and file system. I think Norton Works will do it but …

Member Avatar for jjaydnn
0
131
Member Avatar for Ahmed Padela

did you look at those errors and make any attempt to fix them yourself? For example, the error on line 33: you have misspelled the keyword [b]while[/b]. Now, look again and see if you can't see what's wrong.

Member Avatar for Ancient Dragon
0
71
Member Avatar for kadeemdagreat

line 4: function names can not contain embedded spaces. Either delete the space or replace it with '_' character. And the first parameter is coded incorrectly. Looks like all you want is a pointer to a double, not an array of doubles [code] int grade input (double *a, double *i) …

Member Avatar for WaltP
0
219
Member Avatar for meiyantao

[URL="http://en.wikipedia.org/wiki/Chicken-and-egg_problem"]chicken & egg proglem[/URL] If the file contains binary representation of integers then the bytes may have to be reversed on the receiving os. This is common problem when transferring files between MS-Windowos and *nix/Unix -- [URL="http://searchnetworking.techtarget.com/sDefinition/0,,sid7_gci211659,00.html"][b]big endian little endian[/b][/URL] As for your specific question -- I don't know, sorry.

Member Avatar for meiyantao
0
187
Member Avatar for boyz

>>But in case you don't have a book... Buy, Beg, Borrow or Steal one.

Member Avatar for vmanes
0
90
Member Avatar for kiel19

I suppose you think we are that stupid? That isn't your program because it does not do anything that is required in your assignment that you originally posted. We aren't as dumb as you might think we are. Trash that entire program and begin a new one. This time we …

Member Avatar for WaltP
0
743

The End.