15,300 Posted Topics

Member Avatar for Yellowdog428

you have to flush the input keyboard buffer of the '\n' after each numeric input [code] cout << "Enter the players number :"; cin >> player[i].number; cin.ignore(); cout << "Enter the players points :"; cin >> player[i].points; cin.ignore(); [/code] line 34: that's an infinite loop because 0 is ALWAYS less …

Member Avatar for Ancient Dragon
0
87
Member Avatar for dpfaff

>>correct = compareNumbers[user, lottery]; First, compareNumbers is uninitialized, which is why you get the core dump. Second, what exactly is that line doing? compareNumbers is a simple integer, so how can you possibly use it like that ???? user and lottery are both int arrays. That doesn't make sense, but …

Member Avatar for Ancient Dragon
0
269
Member Avatar for kalodakilla

[quote] Take the FileList as the only command line parameter. For example, C:\>TinyGoogle.exe myfilelist.txt[/quote] You need to create a file that contains the names of all the other files that your program is to index. So you have to create myfilelist.txt before you can do anything. >>what does the command …

Member Avatar for dougy83
0
94
Member Avatar for Ryano24

>>char play_again = '\n' make that = 'y' instead of '\n' because '\n' doesn't make sense >>while(play_again == '\n') check for 'y' instead of '\n'

Member Avatar for vmanes
0
1K
Member Avatar for The Dude

How about at the summer olympics ? Looks like Pepsi had a winner there :)

Member Avatar for kylethedarkn
0
63
Member Avatar for AlexF

[QUOTE=caperjack;585247]just found this searching google . [url]http://www.fixmyxp.com/content/view/187/129/[/url][/QUOTE] link doesn't work. But OP's intentions don't sound honorable to me.

Member Avatar for jasimp
0
133
Member Avatar for cppsevennine

1) I presume busy wait you mean the program displays something like the hourglass you see in browsers where the program continues to do something. The only purpose of the hourglass is to let the user know that the program is doing something that may take some time to complete. …

Member Avatar for jaux
0
152
Member Avatar for Roebuc

>>This is the first question I have, does that mean studentType is the base class or persoType is the base class? personType is the base class. >>cout << studentList[count].getFirstName getFirstName is a function, so you need parentheses just like calling any other function [icode]cout << studentList[count].getFirstName() [/icode] Same with getLastName …

Member Avatar for Roebuc
0
107
Member Avatar for Skeezo
Member Avatar for snakeman

Probably if you can find a web service other than IIS for MS-Windows. I thought Apache only ran on *nix, but could be wrong about that.

Member Avatar for Ancient Dragon
0
149
Member Avatar for dmanw100

you don't normally put executable code in a header file. All header files contain are function prototypes, classes , structures and macros. Everything else goes in the *.c or *.cpp implementation file. >> (9/5)*fahrenheit + 32 that is the same as 1 * fahrenheit + 32 because 9/5 = 1 …

Member Avatar for dmanw100
0
111
Member Avatar for Skeezo

[code] struct Contribution { string name; double amount; }; const int MAX = 25; typedef Contribution BigSpender[MAX]; const string NAME_FILE = "names.txt"; const string CONTRIBUTION_FILE = "slush.txt"; void InitProgram( BigSpender& ContributionRec ); int main() { BigSpender ContributionRec; InitProgram( ContributionRec ); return 0; } void InitProgram( BigSpender& ContributionRec ) { return; …

Member Avatar for vmanes
0
85
Member Avatar for curt1203

A structure is nothing more than a collection of items about a common topic. For example: If you want to know about students then you could write a student struct [code] struct student { char name[40]; // student's name int ags; // student's age char address[80]; char city[40]; char state[3]; …

Member Avatar for big24fan
0
98
Member Avatar for WolfPack

[code] This contains a tab This contains 4 spaces But this contains 8 spaces [/code] Just testing. I used Notepad to create the above text My suggestion is to change the option in your text editor to convert tabs to spaces because some people might use 8 spaces while others …

Member Avatar for Dani
0
319
Member Avatar for mofoparrot

>>cout<<tail<<head<<cost<<capacity<<endl; use the loop counter in this line [icode]cout<<tai[i]l<<head[i]<<cost[i]<<capacity[i]<<endl;[/icode] >>If possible I would like to try and figure out how to have it display the titles on top of the numbers... Simple -- print the titles just before line 36 (before the loop starts)

Member Avatar for mofoparrot
0
132
Member Avatar for ITJohn89

[URL="http://www.microsoft.com/express/vc/"]Linky[/URL] But it is a little difficult to learn -- I'd suggest you start with [URL="http://www.bloodshed.net"]Dev-C++[/URL] until you get your feet wet. There are several other free compilers too. If you are interested in books then read one of the [b]Read Me[/b] threads at the top of this board. It …

Member Avatar for mitrmkar
0
117
Member Avatar for Black Magic

Read [URL="http://www.codecodex.com/wiki/index.php?title=Calculate_an_integer_square_root"]this[/URL]

Member Avatar for hammerhead
0
136
Member Avatar for DigitalPackrat

I would work though the tutorial first to find out how things go. Then it will be easier to understand QT.

Member Avatar for eager
0
253
Member Avatar for n8makar

Here is how to code that loop. You can delete lines 8, 10 and 19 [code] int count = 0; while( getline(fin, product[count]) ) count++; [/code]

Member Avatar for vmanes
0
518
Member Avatar for daviddoria

Depending on the compiler you are using you need to install the redistributable files that are found in your compiler's install directory. For examp VC++ 2008 Express files on my computer are here: D:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT Apparently you are using an earlier version of the compiler. Copy those …

Member Avatar for daviddoria
0
105
Member Avatar for RatherBeInVegas

[URL="http://www.winprog.org/tutorial/"]tutorial here[/URL] This is complicated programming and you need to have a good understanding of C or C++ programming. Not a task for beginners.

Member Avatar for William Hemsworth
0
107
Member Avatar for sjgriffiths

pOutData appears to be a pointer to a pointer or a 2d array of strings, like argv parameter to main() In either event line 5 can not work because strtok() only works with 1d character arrays. pOutData needs to be a pointer that is declared similar to the way you …

Member Avatar for Ancient Dragon
0
147
Member Avatar for i_raghuveer

[QUOTE=i_raghuveer;583656]please answer for this..i iwll be very grateful to u[/QUOTE] You didn't ask a question. All you did was dump your homework assignment here.

Member Avatar for i_raghuveer
-1
131
Member Avatar for timdog345

Start at the top of the list you posted and do them just one at a time. Don't attempt to do them all at once. Do the first requirement then compile, correct bugs, and compile again until all problems have been fixed. Only then do you begin the next statement.

Member Avatar for hammerhead
0
126
Member Avatar for Aashath

Do you mean you deleted c:\temp ? Very Very bad thing to do because many other programs use that too for storing temporary files. Re-create that folder and the compiler will be happy. It you check the environment settings you will probably find one called TEMP=c:\temp. That's what programs look …

Member Avatar for Ancient Dragon
0
110
Member Avatar for SonxQ7
Member Avatar for Ancient Dragon
0
88
Member Avatar for Zlim

You sound like an accident waiting to happen. Go to bed and stay there for a week or two. :)

Member Avatar for techbound
0
87
Member Avatar for Cbeginner_us

You didn't even try, did you ??? See [URL="http://www.google.com/search?hl=en&q=Golay+Code+C+source&btnG=Google+Search"]these threads[/URL]

Member Avatar for Cbeginner_us
0
203
Member Avatar for JoBe

also, windows.h doesn't define any c++ classes -- pure C, although you can use in in c++ programs. If the .h extension really bothers you then you could create your own file without the extension and have it call windows.h

Member Avatar for Ancient Dragon
0
348
Member Avatar for WonderWomen204

The use of num1 and num2 in lines 17 and 22 is destroying the values you entered on line 13 and 15. Use some other variables on lines 17 and 22 [code] for (int num3 = 1; num1 <= num1; num3++) { for (int num4 = 1; num4 <= num2; …

Member Avatar for Ancient Dragon
0
105
Member Avatar for Cyb3rAssasin

You need to look for socket programming. Exactly how to do it depends on what operating system you are using. [url]www.DataReel.com[/url] has a large free library that contains client/server programs among other things and is ported to both *nix and MS-Windows.

Member Avatar for Ancient Dragon
0
70
Member Avatar for therwi

Even hear of [URL="http://www.google.com/search?hl=en&q=CreateFont"]google[/URL] ? If not, then you should learn to use it.

Member Avatar for Ancient Dragon
0
64
Member Avatar for steven woodman

I was thinking the same thing as vmanes when I watched that. All fluff and zero substance. Totally useless in business except maybe for flashy presentations. When is someone going to develop a hollagram monitor ? They've been around in sci fi movies for many years.

Member Avatar for jbennet
0
158
Member Avatar for The Dude

>>10. Always wear a belt I wouldn't think of walking out of my house without one because my pants would fall to the ground and I'd have to flash everyone -- then I'd get tossed in jail for indecent exposure. >>9. White socks are only worn during athletic activities I …

Member Avatar for jbennet
0
71
Member Avatar for The Dude
Member Avatar for hostintruder

line 29: recordcounter must be a const integer if it is to be used to set the array size as shown in lines 30-33. That means it must be a value > 0. [code] const int recordcount = 255; Person person[recordcounter]; [/code] lines 30-33: delete all but one those arrays …

Member Avatar for hostintruder
0
109
Member Avatar for Lensva

lines 9 and 10: why are those pointers? The whole purpose of the std::string class is to remove get rid of pointers and memory allocations from coder's obligations. There is no need at all for those two pointers lines 23 and 24: again, why? If you don't use the pointers …

Member Avatar for Lensva
0
109
Member Avatar for >shadow<

I'm supprised they would accept that kind of record because its so easy to cheat. And 30 replies is peanuts compared to many boards and in the Games board here at DaniWeb. One such game has almost 2,000 posts and that's one of the smaller ones. Now, something like "Online …

Member Avatar for >shadow<
0
110
Member Avatar for BBustos

>>if (buf[i] < 0 || buf[i] > 9) Wrong -- you need to check for '0' and '9' (in quotes). Your program has a major logic flaw. First assume the string is valid, then stop looking if any of the characters are not valid. The way you have it the …

Member Avatar for vmanes
0
128
Member Avatar for tefflox

I tried to read some of those links -- horrible, someone needs to get off drugs. And the text fading in and out like that is extremly annoying. I'd delete this whole thread only because those links are soooo awful.

Member Avatar for tefflox
0
123
Member Avatar for alexhkleung

The code you posted isn't very useful. Check for missing semicolons, especially at the end of the class declaration [code] class object { <snip> [color=red]};[/color] [/code] Looks like the problem may be in the way you have the header files included. food.h >> objects.h >> maincontrol.h >> food.h So nothing …

Member Avatar for alexhkleung
0
307
Member Avatar for alexhkleung

post code. If its reading character by character then it will pick up spaces too. [code] char c; while( infile.get(c) ) { } [/code]

Member Avatar for alexhkleung
0
121
Member Avatar for BBustos

use the isalpha() macro in ctype.h [code] bool GetString(char buf[]) { int i; int length; bool valid; cin.getline(buf, 30); length = strlen(buf); for (i = 0; i < length; i++) { if( !isalpha(buf[i]) ) { return false; } } return true; } [/code]

Member Avatar for BBustos
0
124
Member Avatar for samush

line 4 is declared wrong. should be [icode]long long[/icode], not [icode]long int[/icode] To my knowledge there is not such thing as [b]long int[/b]

Member Avatar for samush
0
150
Member Avatar for kse989

Which of all those files contains the problem you are trying to resolve? queueTest.cpp ? In that file line 3 is just wrong [code] ostream out("outfile.txt"); <snip> queue.Print(out); [/code]

Member Avatar for Ancient Dragon
0
186
Member Avatar for code12

Your program after line 7 is a big mess. Just delete all that junk. I don't know what all those parameters to the delete function are supposted to be, but you don't need any of them. All you have to do is open the input file, read the first and …

Member Avatar for code12
0
135
Member Avatar for kartouss

I hope you realize that std::string in c++ programs is not the same as a String in VB. The function exported in the dll needs to be written in such a way that it can be called from languages other than c++, such as this: [icode]int _stdcall ss(const char* de)[/icode] …

Member Avatar for kartouss
0
177
Member Avatar for Jon Jon

It might be compiler dependent, but VC++ 2008 Express will accept a 64-bit integer as the first parameter to seekg() which I guess means it supports huge files.

Member Avatar for Ancient Dragon
0
82
Member Avatar for Fredonald

Want a Ph.D. ? You can buy one [URL="http://www.ashwooduniversity.net/AU/online_registration.aspx"]here[/URL] for $600.00 USD :)

Member Avatar for Ancient Dragon
0
305
Member Avatar for steven woodman

[QUOTE=steven woodman;576306]ha, just got an infraction should have known better then to hit people with a gaypenis swinging site. Anyways I figured it might be cool to see if anyone else has gotten an infraction and what for. So if you've gotten one tell me how. SW[/QUOTE] You are lucky …

Member Avatar for jbennet
0
237

The End.