5,226 Posted Topics

Member Avatar for stupidenator

> cin >> inp[40]; The next problem is you're inputting only a single char, but its off the end of your array. cin >> inp; Would input a single word into your array. > inp[k] = '\n'; This loop does nothing useful. > if (trade(word[i] == '\n')) This performs a …

Member Avatar for stupidenator
0
119
Member Avatar for mogey
Member Avatar for Quan Chi2

Assuming you mean via a network, then perhaps [url]http://beej.us/guide/bgnet/[/url]

Member Avatar for Nedals
0
103
Member Avatar for shortLived

[url]http://cch.loria.fr/documentation/IEEE754/ACM/goldberg.pdf[/url] Read this and understand how all floats are approximations, which means no matter what you do, you invariably end up with ab.cd0000001 or ab.cc999999 type numbers as being the nearest representable value to ab.cd Using floats for storing money is a really bad idea.

Member Avatar for Ancient Dragon
0
145
Member Avatar for moznmar

> cout << "Type 1 to exit or 0 to continue." << endl; > cin >> exit; Put these two lines inside your inner while loop, so you ask after each response. > while (!correct) Change to while (!correct && !exit) exit is also the name of a function in …

Member Avatar for moznmar
0
112
Member Avatar for Aldin

> if ( filename == "day_01.txt") Use if ( strcmp( filename, "day_01.txt" ) == 0 )

Member Avatar for masa
0
459