Search Results

Showing results 1 to 13 of 13
Search took 0.08 seconds.
Search: Posts Made By: Ancient Dragon ; Forum: C++ and child forums
Forum: C++ 1 Day Ago
Replies: 2
Views: 109
Posted By Ancient Dragon
string resides in std namespace and you have to tell the compiler what namespace it's in. You have several options (use only one of the options listed below)

using namespace std; put that after...
Forum: C++ 3 Days Ago
Replies: 2
Views: 128
Posted By Ancient Dragon
Here is another way

if( file.is_open() )
{
int n, x;
float f;
file >> n >> x; // get first line
setM(n);
setX(x);
MatrixHandler data(n, n);
Forum: C++ 3 Days Ago
Replies: 2
Views: 124
Posted By Ancient Dragon
Yes because MFC doesn't know a thing about std::string. CString is the data type used by MFC to transfer strings from member variables to/from the MFC controls, such as edit box. There is a lot of...
Forum: C++ 7 Days Ago
Replies: 1
Views: 197
Posted By Ancient Dragon
Do you mean you read a c++ tutorial (you did NOT write it), and you want to know how to compile it? What compiler do you have? Each compiler is different.
Forum: C++ 7 Days Ago
Replies: 2
Views: 165
Posted By Ancient Dragon
Did you try deleting all object files and recompiling everything? If that doesn't work then post the offending source file.
Forum: C++ Jun 22nd, 2009
Replies: 2
Views: 347
Posted By Ancient Dragon
Just a guess, but if you are trying to read the contents of a structure perhaps there are holes in the structure, such as the packing factor is something other than 1.

#pragma pack(1)
struct...
Forum: C++ Mar 28th, 2009
Replies: 4
Views: 385
Posted By Ancient Dragon
The reason it closes is because cin left the Enter key '\n' in the keyboard buffer, and the next cin.get() just removed it. To fix this problem you need to flush the keyboard buffer after entering...
Forum: C++ Mar 14th, 2009
Replies: 2
Views: 219
Posted By Ancient Dragon
integer digits are also characters. For example '0', '1', '2', ... '9' are all ascii characters just as 'a', 'b', ... 'z' are ascii characters.

Its quite easy to convert an ascii numeric...
Forum: C++ Feb 4th, 2009
Replies: 8
Views: 1,064
Posted By Ancient Dragon
Freeky -- again, that code requires the use to hit the Enter key

Nishinoran: since your program is already using kbhit() when the program returns to the place to begin getting keys from the...
Forum: C++ Oct 19th, 2008
Replies: 6
Views: 452
Posted By Ancient Dragon
Seek and thou shalt find. (http://www.daniweb.com/search/search.php?q=pointer+tutorial)

>>How do we know the type the pointer points?
You have to declare the data type when the pointer is...
Forum: C++ Apr 1st, 2008
Replies: 9
Views: 848
Posted By Ancient Dragon
Been there, and done that (VietNam). I serverd 23 years in USAF (1962-1985) but I admit I was never shot or a POW. We have no greater respect than for our military and civilians now serving in Iraq...
Forum: C++ Sep 12th, 2006
Replies: 8
Views: 11,676
Posted By Ancient Dragon
Here (http://www.cplusplus.com/ref/iostream/fstream/) is a link I find a useful reference.
Forum: C++ Jul 26th, 2006
Replies: 4
Views: 14,314
Posted By Ancient Dragon
here is a pure c++ version that replaces the C-style char array with std::string and removes the tmp variable altogether.

From the looks of this function it must be just a code snippet of a larger...
Showing results 1 to 13 of 13

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC