LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-18-2008, 01:10 AM   #1
linuxsavar
Member
 
Registered: May 2007
Distribution: slackware
Posts: 34

Rep: Reputation: 15
runing comiled of this code in wine has problem


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
 
Old 01-18-2008, 02:38 AM   #2
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
My C++ is a little rusty but it looks ok to me. Maybe a wine bug. Have you tried to compile with gcc so it run in Linux?
 
Old 01-18-2008, 08:47 AM   #3
linuxsavar
Member
 
Registered: May 2007
Distribution: slackware
Posts: 34

Original Poster
Rep: Reputation: 15
Yes i tried it in linux with g++
it worked normally.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
small syntax problem with C code (implemented in Code Composer Studio) illiniguy3043 Programming 6 01-07-2008 02:14 AM
problem runing xwin's wakeup44 Linux - Software 2 03-10-2007 08:00 AM
Problem runing squid hard_wired_00 Linux - Networking 8 07-01-2006 12:40 PM
Comiled HTML help files under linux fbarsoba Linux - Software 2 03-20-2006 09:46 PM
Installing/Runing Wine Tenover Linux - Newbie 7 08-22-2003 04:42 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration