Search:
Type: Posts; User: dcjr84
Search:
Search took 0.13 seconds.
-
November 3rd, 2007, 08:44 PM
IMO, pass-by-reference and pass-by-pointer accomplish the same thing. Mainly, to be able to modify/use some method parameter without copying it so that the changes are reflected in the calling...
-
November 3rd, 2007, 08:32 PM
a as you have defined it is a character array, and not a string object. Therefore, you cannot use the length() member function of that class to determine its length.
If you are trying to find out...
-
December 23rd, 2006, 01:03 AM
The reason that your program just closes after you type in the name is because some IDE's do not automatically pause the program after execution so you can see the results.
There are many...
-
December 21st, 2006, 03:40 AM
I think the solution from JMS is probably the best
char buff[128];
memset( buff, 'A', sizeof( buff ) -1 );
buff[ sizeof(buff)-1 ] = '\0';
Also, call me crazy, but I recall when...
-
December 20th, 2006, 12:47 PM
A lot of good points have been made here by the posters above, you should read them over.
Not much else I can think of to add at the moment.
All I can say is that when you start to work with...
-
December 20th, 2006, 12:37 PM
As stated above by the other posters, you need to at least attempt this on your own before we will help you.
This is not a site where we do peoples C++ coding assignments for them.
If that's...
-
December 20th, 2006, 12:28 PM
-
December 19th, 2006, 02:02 PM
Also, please use [ code ][ /code ] tags when posting source code.
It is almost impossible to read the code you have posted.
-
December 19th, 2006, 12:05 AM
If I am understanding your question correctly, you are talking about interprocess communication.
If this is the case, then yes it is possible. Well, to an extent anyways.
I don't know about...
-
December 18th, 2006, 11:34 PM
* Sigh *
I am starting to think that my college is the only one in the United States (perhaps the world) that teaches people how to use their debugger to solve coding problems.
Perhaps I am...
-
December 18th, 2006, 11:27 PM
There may be some compiler optimization options to do so (at least for release build).
But I would imagine if there are, then they are compiler dependent.
Meaning, you would need to consult...
-
December 18th, 2006, 11:25 PM
Have you tried using your debugger?
It is extremely helpful when your program compiles fine, but does not behave as you expect it to.
You can check variable values, and set breakpoints to stop...
-
December 18th, 2006, 11:22 PM
I lost you on this line here.
It doesn't make any sense.
You can't just assign your struct the value of 128. Also, you already use the write() function, so what is the need for <<?
If you...
-
December 17th, 2006, 10:06 PM
My apologies :D
Naturally, I was referring to a console program when I said this.
Obviously, if you are a truly running a DOS program, then you will not be able to use Windows API's because...
-
December 17th, 2006, 04:40 PM
Though the above poster made a good suggestion to use the boost::threads library, I thought I should throw in my two cents here.
Unless you have multiple processors in your computer, there is no...
-
December 15th, 2006, 11:10 PM
Have you tried using your debugger to check variable values and such during your program's execution?
Perhaps this will give you some insight as to why it doesn't work all the time.
...
-
December 15th, 2006, 12:55 AM
1) Use [ code ][ /code ] tags when posting source code.
2) Your header files are incorrect. Standard library headers with .h are not used anymore.
(Though I see you use printf(), so this is...
-
December 14th, 2006, 11:05 AM
Basically, what screetch is saying is that when you are dealing with templates, you really can't separate the class declaration from the members functions like you would with normal, non-templated...
-
December 14th, 2006, 10:53 AM
I deleted my post.
I was half asleep on the keyboard when I made it.
Later when I saw what I had typed, I decided it was the most absurd post I had ever made.
Still not sure of the reasoning...
-
December 14th, 2006, 04:09 AM
I can't understand you.
What was wrong with laasunde's suggestions?
-
December 14th, 2006, 01:42 AM
You need to post all of your code.
There is no way we can figure out what is wrong from this little snippet.
And use [ code ][ /code ] tags when posting source code.
-
December 13th, 2006, 09:40 PM
Phillip's second suggestion is the the best way to do this.
I highly recommend using it :D
-
December 13th, 2006, 09:31 PM
Can I take a wild guess at this...
Do you use cin >> someVariable somewhere before you do the getline()?
I am willing to bet that you do.
If so, this is the problem.
To fix it, you need...
-
December 13th, 2006, 09:21 PM
The string::c_str() member function returns a const char*.
The syntax he is using is correct.
You are correct Phillip. This needs to be checked also.
I admit, I didn't notice it at...
-
December 13th, 2006, 09:13 PM
Well, this still isn't enough code to reproduce the result effectively, but I am gonna take a guess as to what is causing the problem...
Look here...
string score[9] = "";
...
|
Click Here to Expand Forum to Full Width
|