What's is wrong with it ?!

It's driving me crazzzzzyyyy!!!!

i don't know what do...
Something gives me an error that comes popping up every time I cin something.
Please Help

[code]#include <iostream>
#include <string>
#include <time.h>
#include <Windows.h>

using namespace std;
bool RofQ(char R);

int main(){

char UserInput[10];
char R;
bool R2;

std::cout <<""<< endl << endl;
std::cout << "Hello, i'm IRIS what can i do for you ?" << endl;
std::cout <<"Don't know what to do ? Press 'H' "<< endl;
std::cin >> UserInput[1];

switch(UserInput[1]){

case '1':{

cout <<"The time is: " << "" << endl << endl; //Later wordt er op de plek "" de tijd gezet...
RofQ(R);
}
case 'H':{

cout << "1 = Time" << endl;
RofQ(R);
}
}
R2 = RofQ(R);

if(R2 == true){

return main();
}

if(R2 == false){
cout << "Alright then...Goodbye !" << endl << endl;
cout << "----------NPp PRODUCTIONS------------" << endl;
Sleep(4000);
return 0;

}
}

bool RofQ(char R){

cout << "Anything else ?(y/n)" << endl;
cin >> R;

if(R == 'y')
cout << "Redirecting" << endl;
Sleep(4000);

return true;


if (R == 'n')
return false;
}/code]
You can only accept one char into slot one of that char[]. Just so you know.
Thanks a lot @ciphermagi but it keeps saying that the Variable R is being used without being initialized?
I know what it means but I just can't get it working properly...
It is directing to RofQ(R) when it gives me the error code.
?????Help????
You never assign a value to R before you pass it. You call rofQ(R), without a value being assigned to R. Generally, that would just assign garbage to R, but it looks as if your compiler is being nice.
So what do I have to do know in the code??
(Sorry guys, but I'm new to coding for 2 months xs ....
Last edited on
Topic archived. No new replies allowed.