ok i think ive got this right i but i tried compiling an it spit out
error: expected primary-expression before ‘.’ token|
any idea what this "primary expression is? ive tried single quotes and double quotes to fix it as i have this problem every time i mess with strings or chars.
where i am having trouble at is in red.
#include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;
class R
{
public:
int x;
int y;
string a;
void message()
{
cout<<"input to repeat: ";
}
void getinput()
{
cin>>a;
}
void repeat()
{
for(x=0; x<1000; x++)
{
cout<<a;
}
}
void loop()
{
for(y=0; y<1000; y++)
{
message();
getinput();
repeat();
}
}
void checks()
{
if(R.a=="clear")
{
system("clear");
}
}
};
int main()
{
R now;
now.loop();
}