Search:
Type: Posts; User: ZuK
Search:
Search took 0.09 seconds.
-
November 9th, 2012, 05:51 AM
There is another problem with your code.
EOF is usually defined as the int -1. If you assign it to a char then the value will be truncated and the test will never be true.
BTW that is the reason...
-
August 31st, 2012, 01:52 PM
Trouble is that in the original code m_var is a reference to string.
I got it to compile without errors with g++ 4.6.3
but somehow that feels wrong
#include <iostream>
#include <string>...
-
August 29th, 2012, 04:04 PM
You have bufferoverflows in your bubblesort.
And please use CODE tags when posting code.
Kurt
-
August 15th, 2012, 02:37 PM
remove it. It always returns true.
But I could imagine that the original intent was to check for non empty words.
if ( word > "" )
would be the same as
if ( !word.empty() )
Kurt
-
August 13th, 2012, 05:43 AM
How is the function called sf_open or sfopen ?
Kurt
-
August 12th, 2012, 06:37 AM
It depends on the way you want to use your class. e.g. if you want to add objects of your class into a standard container then it is needed.
That has nothing to do with the existence of a default...
-
August 11th, 2012, 05:42 AM
Show a minimal code example that shows the same error.
Kurt
-
August 8th, 2012, 02:48 AM
The operators < and > of GreedyObject and MNode should be declared const.
Also you have to #include <ctime> and <cstring>
Kurt
-
August 6th, 2012, 04:33 PM
C_IADS_TCP_Manager *mp_IADS_TCP_Manager;
If the class is really called C_IADS_TCP_MANAGER ( all capitals ) that would explain the error message
Kurt
-
August 6th, 2012, 06:19 AM
person::getsalary() doesn't return anything ( it should if I look at the declaration ) and it seems to be implemented as pure input function.
Kurt
-
August 5th, 2012, 02:10 PM
There is one thing that has not been stated clearly when talking about the difference between copy constructor and assignement operator.
The assignement operator has to release any resorces that the...
-
August 5th, 2012, 04:27 AM
Is this what you try to do ?
#include <iostream>
#include <string>
using namespace std;
struct clientdata
{
string vClientName;
-
August 3rd, 2012, 03:03 PM
a 4 byte float ( single precision ) has only about 7 significant decimal digits.
so you can only expect a float and a double to be same for 7 digits.
if you need more precicion you have to use...
-
August 3rd, 2012, 02:44 PM
Not true. '\n' is whitspace and the streamextractor for an int skips leading whitspaces by default.
Kurt
-
August 3rd, 2012, 08:34 AM
I'd add some output statements
e.g.
int x = 0, y = 0, z = 0;
ifstream data("blah.txt");
while( data >> x >> y >> z)
{
std::cout << "x:" << x << " y:" << y << " z:" << z << std::endl;
...
-
August 3rd, 2012, 08:04 AM
First of all you should check for a successfu read.
Seems that reading fails and that's why you get an infinite loop.
try something like this
int x = 0, y = 0, z = 0;
ifstream data("blah.txt");...
-
July 28th, 2012, 04:07 PM
If that program is due tomorrow then you're quite late.
Your main mistake is that the couresdata that you're manipulating or printing is local to the functions.
That is why the data is lost after...
-
July 28th, 2012, 03:38 PM
I'm sorry that I didn't understand any of your other "questions"
Kurt
-
July 28th, 2012, 03:15 PM
break and continue won't have much effect in your code. They work only when inside of loops.
You are missing some curly braces.
void addnewcourse()//idont want to put anything here in parameters...
-
"\"C:\\Documents and Settings\\Notepad.exe\" \"C:\\My Directory\\ReadMe.txt\""
-
You might want to read http://en.wikipedia.org/wiki/ANSI_escape_code
Kurt
-
I'm not shure that I understand what you are asking
placement new comes to my mind
#include <cstdlib>
#include <memory>
#include <iostream>
#include <string>
void * my_allocate( size_t sz )...
-
Well. I understand that arrays of size 0 are not legal. Some/most C compilers let you get away with this kind of structures just to be able to append some data to this structures.
Usually used this...
-
You can't assign to an array.
Use strcpy() instead.
strcpy( (char *)x->content, message.c_str());
Kurt
-
I would just convert the ascii code of each of the password characters into a hex string.
Kurt
|
Click Here to Expand Forum to Full Width
|