15,300 Posted Topics

Member Avatar for SndSystm

its probabably that while statement. when point == nextpost, when does nexpoint == 7? Lets say nextpoint == 2. The loop will become infinite because [icode]7 != nextpoint[/icode] is always true.

Member Avatar for SndSystm
0
116
Member Avatar for StillCrazy

[URL="http://lmgtfy.com/?q=c+program+to+draw+pie+charts"]Here are some links[/URL] If the cobol program writes the data to a disk file then a c or c++ program should be able to read it.

Member Avatar for Ancient Dragon
0
98
Member Avatar for roryt

If you really want a response then you need to post the code you have done or tried.

Member Avatar for roryt
0
165
Member Avatar for ademsaykin

[URL="http://daweidesigns.netfirms.com/cgi-bin/pointers.php"]Here [/URL]is a good tutorial on pointers.

Member Avatar for Ancient Dragon
0
90
Member Avatar for southernd0529

you need some { and }s. [code] while (indata) { if (letter >='a' && letter <='d') { pass++; all++; } else (this is where the error is) if(letter >='d' || letter <='f') { fail++; valid=(pass+fail); } else { outdata<<letter<<endl; all++; indata>>letter; } [/code]

Member Avatar for southernd0529
0
141
Member Avatar for daviddoria
Member Avatar for kuru225

>>If the larger number is odd, what happens if the larger number is even ?

Member Avatar for kuru225
0
169
Member Avatar for sankari27

might be because on or both strings are uninitialized. If you are using a modern compiler its unlikely stack space is the problem.

Member Avatar for Ancient Dragon
0
68
Member Avatar for littlespy

1) [b]c[/b] must be of type int, not char, because EOF won't fit in a char. 2) Open the file in binary mode and read it one character at a time. The function readFile() is very dangerous because you have no clue how much memory was allocated for the string! …

Member Avatar for Aia
0
160
Member Avatar for ahvicm

There are no standard ways to do it. [URL="http://www.programmersheaven.com/mb/CandCPP/150284/150284/password-program/?S=B20000"] Here is one way[/URL]

Member Avatar for tux4life
0
88
Member Avatar for CoolAtt

There isn't a standard way to do it -- depends on the operating system. You might try calling onexit(), but it may not get called when Ctrl-C is hit.

Member Avatar for CoolAtt
0
255
Member Avatar for sid78669
Member Avatar for endisbegun

I don't understand what you are asking. How to output the vector in referse order? Just create a loop that counts backwards.

Member Avatar for endisbegun
0
94
Member Avatar for atreides27

>>i need to concatenate the two words Yes, use strcat() for that. [icode]strcat(s1, s2);[/icode] That works as long as the length of the two strings do not exceed the space allocated for s1 (which is 100). >>also somehow need to test to see if the word is a palindrome create …

Member Avatar for SeeTheLite
0
146
Member Avatar for ARYT

lines 8 and 9. Files can not be opened outside a function like you have it. Move both those lines down to within main() (line 14). line 16: eof() will not give you the file size, it just tells you that the end-of-file has been reached and nothing more. To …

Member Avatar for Ancient Dragon
0
219
Member Avatar for f.ben.isaac

You could shift everything after "Happy" left 5 positions to overwrite that text, which will move the empty spaces to the end of the buffer. Since its a binary buffer (I think it is anyway from your description) you can fill the remaining bytes with '\0'. So if the buffer …

Member Avatar for f.ben.isaac
0
507
Member Avatar for greg022549
Member Avatar for VernonDozier
0
124
Member Avatar for orwell84

Two problems: 1) need a return value to return the factorial. Your function does the recursion but doesn't calculate anything. 2) The function's return value should be int, not void.

Member Avatar for orwell84
0
161
Member Avatar for greg022549

1) you have to ask nicely :) But we normally don't delete posts unless it violates one or more of the [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]DaiWeb Rules[/URL]. 2) Click the "Go Advanced" button, scroll down to "Manage Attachments".

Member Avatar for Ancient Dragon
0
39
Member Avatar for Takafoo
Member Avatar for Takafoo
0
128
Member Avatar for SUD

[URL="http://www.daniweb.com/forums/thread90228.html"]Here is an extensive thread [/URL]that discusses how to use it.

Member Avatar for William Hemsworth
0
866
Member Avatar for Talguy

You will have to lock the queue in order to synchronize the two threads. Disaster will strike your program dead if you allow multiple threads to access a single common object without first locking them. One way to do it is use mutex's. The main thread should create a named …

Member Avatar for Talguy
0
119
Member Avatar for nito28

>>line 20: b[i]=(i+1)/10; This is odd coming from a professor. All values of i that are less than 10 will result in a value of 0. Values of i between 10 and 19 are 1, etc. Why would you want to initialize an array with those kinds of numbers?

Member Avatar for StuXYZ
0
134
Member Avatar for erialclaire_238
Member Avatar for PRATS 1990

depends on your version of windows. But why would you want to do that anyway? With Vista just copy it to here: C:\Users\<your login name here>\Desktop

Member Avatar for PRATS 1990
0
103
Member Avatar for Theateist

It doesn't work because on line 7 the array is treated as a pointer, and the size of all pointers in 32-bit compilers is 4. If you want myfunc() to know the size of the array then it will have to be passed as another argument. [icode]void myfunc(const Car A[], …

Member Avatar for Ancient Dragon
0
74
Member Avatar for FrancisC07

[QUOTE=FrancisC07;830390]Hi! can someone tell me how to count the number of lines?[/QUOTE] I suppose you mean the number of lines in a file??? create an int variable and initialize it to 0. Open the file. Set up a loop to read the file one line at a time using getline() …

Member Avatar for Ancient Dragon
0
163
Member Avatar for Red_Indian

Its not in the registry, but maintained on a clock cpu chip. [URL="http://lmgtfy.com/?q=how+to+synchronize+time+on+network+computersl"]This is how to synchronize network computers.[/URL]

Member Avatar for Red_Indian
0
86
Member Avatar for cruisx

You are probably using VC++ 2008 Express, which by default compiles everything for UNICODE. You have two choices: (1) Turn UNICODE off. Projecct --> Properties --> Configuration Properties --> General. In the controls shown in the right-hand side of the screen look for "Character Set" (3d from the bottom) and …

Member Avatar for nucleon
0
15K
Member Avatar for shea279

c++ is a lot stricter about typcasting than C. For example, in C it is not necessary to typecase the return value of malloc(), but in C++ it is required. Which one of the lines you posted is line 27?

Member Avatar for shea279
0
259
Member Avatar for sid78669

just use two (or more) case statements with no break in between [code] switch(keycode){ case DOWN : case TAB: if(edtIndex == editSize - 1){ fieldPos = edtList[0]; edtIndex = 0; } else if(edtIndex < editSize - 1) fieldPos = edtList[++edtIndex]; break; } [/code]

Member Avatar for Ancient Dragon
0
132
Member Avatar for vinitt88

If you want to write your own mini-dos then you can not use the system() function for anything. You can get list of files and sub-directories in MS-Windows by using the FindFirstFile() and FindNextFile() win32 api functions (look them up with google to find exact syntax.) You can find all …

Member Avatar for Ancient Dragon
0
146
Member Avatar for badboizEnt

on line 21 you need to look up the username in a database and, if found, verify the password. Put lines 10 thru 21 in a loop so that the program can start all over again if the username and/or password are incorrect (not found in the database) Note that …

Member Avatar for badboizEnt
0
223
Member Avatar for dise652
Member Avatar for kahaj

worked perfectly ok for me [code] Enter first number: 10 Enter second number: 20 Sum is 30 Press any key to continue . . . [/code] Perhaps its the compiler you are using -- what compiler and operating system?

Member Avatar for PRATS 1990
0
101
Member Avatar for GrimJack

[quote]Spence drew inspiration for the EyeBorg Project from his tiny cellphone camera and his love of The Six Million Dollar Man[/quote] I liked that tv series a lot -- apparently got very good ratings because it lasted several seasons and had a spin-off.

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

See post #71 of [URL="http://www.daniweb.com/forums/post827710.html"]this thread:[/URL] Is that link supposed to exist any more? Dani posted it in that thread about a year ago (see post #53)

Member Avatar for Dani
0
38
Member Avatar for Takafoo

When the error occurs you need to flush the input buffer of all remaining characters. Narue has written an excellent article about flushing the input buffer[URL="http://www.daniweb.com/forums/thread90228.html"] here.[/URL]

Member Avatar for Takafoo
0
103
Member Avatar for Madbuda

yummy :) :) But that is certainly a quick way to clogged arteries and heart attack.

Member Avatar for jbennet
0
414
Member Avatar for death_oclock
Member Avatar for mcldev
0
852
Member Avatar for erin0201

cin won't allow alpha characters to be entered into numeric fields. So when you have [icode]cin >> num1[/icode] num1 will NEVER have 'x' or 'X'. What I would do is get input data as strings so that you can easily determine if the input character is 'X'. Something like this: …

Member Avatar for erin0201
0
133
Member Avatar for admiralxgmx

Where exactly is Jonathanland? I never heard of it and apparently google hasn't either.

Member Avatar for sneekula
0
510
Member Avatar for tomtetlaw
Member Avatar for tomtetlaw
0
201
Member Avatar for johnray31
Member Avatar for pamod

You will need to make the first field in each record the auto-generated number. Then when you need another number, just read the last record in the file and increment the number to get the next number. If the database is going to be fairly small you can just read …

Member Avatar for Ancient Dragon
0
79
Member Avatar for preet4fun
Member Avatar for Ancient Dragon
0
75
Member Avatar for GDICommander
Member Avatar for asifjavaid

ftell() returns a long int, and the max value is declared in limits.h. If yours is like mine then the 4 gigs is too big.

Member Avatar for Ancient Dragon
0
327
Member Avatar for serkan sendur

No, you apparently lost. It's not really anything to us if we convinced you not to cheat. Had you studied like you should have then you would not have had to turn in a blank piece of paper as your assignment. You apparently have a bad case of poor time …

Member Avatar for nav33n
0
105

The End.