hi all
i am newbie to c++
i wrote this code for excercise.
Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string az;
int co=1,i=1;
while(co)
{
cout<<endl<<"input world number"<<i<<"(q for quite):";
getline(cin,az);
if(az=="q" || az=="Q")
exit(1);
else
cout<<az<<endl;
i++;
}
return 0;
}
and then compiled it with mingw32(with codeblocks)
under windows it worked normally
my mean from normally is it printe a message, i input a world and press enter then it print that world and ask me another word.like this:
Code:
input world number5(q for quite):hello
salam
input world number6(q for quite):
but when i tried it with wine.it only asked me for first time and after i pressed enter for first time it didnt wait for me and print the request message until i stoped it with ctrl+z.it is something like this:
Code:
input world number1(q for quite):hello
hello
input world number2(q for quite):
input world number3(q for quite):
input world number4(q for quite):
input world number5(q for quite):
.
.
.
now my question is :is something in my code is wrong or it is wine bug?
thanks