You need to take care when using the 'using' command in C++. If that code sits in a header file and will itself be included into another file, then you should not put a 'using' at the top level.
If this is the case for your code, then you can put the 'using' command within the class.
#include "iostream"
#include "ctime"
#include "cstdlib"
#include "stdio.h"
#include "string"
#include "DarkSDK.h"
class sphere_dude
{
using namespace std; // <---- HERE!!!
public:
int X, Y;
const static int R = 10;
// Create a string to hold coords that will be printed to the screen.
string X_string;
sphere_dude ()
{
// dummy constructor
}
void moveRight (int YAdj)
{
Y = Y + YAdj;
this->draw(X, Y);
}
void moveLeft (int YAdj)
{
Y = Y - YAdj;
this->draw(X, Y);
}
void moveDown (int XAdj)
{
X = X + XAdj;
this->draw(X, Y);
}
void moveUp (int XAdj)
{
X = X - XAdj;
this->draw(X, Y);
}
void draw (int X, int Y)
{
dbCircle (X, Y, R);
}
void returnPos (void)
{
X_string.append ( "X: " );
X_string.append ( dbStr(X) );
X_string.append ( " | Y: " );
X_string.append ( dbStr(Y) );
//dbPrint ( iX_string );
dbSetCursor ((X - 60), (Y - 75));
dbPrint ( const_cast<char*>(X_string.c_str()) );
X_string = " ";
}
};