0

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();
}
2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Anarionist
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.