J
John Swan
I dont think I have ever been as dissappointed, frustrated or bewildered in
all of my life.
The problem, well take this class definition:
#ifndef __DATA
#define __DATA
#pragma once
#include <iostream>
#include <string>
class Data
{
public:
Data(void);
~Data(void);
private:
int XAxis, YAxis, StartFrom;
};
#endif
This will compile quite happily. However, if I were to add a string called
s1 it wont compile.
#ifndef __DATA
#define __DATA
#pragma once
#include <iostream>
#include <string>
class Data
{
public:
Data(void);
~Data(void);
private:
int XAxis, YAxis, StartFrom;
string s1;
};
#endif
When I try to compile the above code I get: Error C2146, c2501 twice.
Can anyone please tell me what I am doing wrong please?????
I really am glad this is a small project. I am going to develop using QT.
Multi platform and a dream in comparison. Apparently.
Opions please.
Cheers
John
all of my life.
The problem, well take this class definition:
#ifndef __DATA
#define __DATA
#pragma once
#include <iostream>
#include <string>
class Data
{
public:
Data(void);
~Data(void);
private:
int XAxis, YAxis, StartFrom;
};
#endif
This will compile quite happily. However, if I were to add a string called
s1 it wont compile.
#ifndef __DATA
#define __DATA
#pragma once
#include <iostream>
#include <string>
class Data
{
public:
Data(void);
~Data(void);
private:
int XAxis, YAxis, StartFrom;
string s1;
};
#endif
When I try to compile the above code I get: Error C2146, c2501 twice.
Can anyone please tell me what I am doing wrong please?????
I really am glad this is a small project. I am going to develop using QT.
Multi platform and a dream in comparison. Apparently.
Opions please.
Cheers
John