X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Martin Ambuhl Newsgroups: comp.os.msdos.djgpp Subject: Re: problem with compiling Date: Tue, 31 Aug 2004 15:49:58 -0400 Lines: 32 Message-ID: <2pk33eFlff4aU1@uni-berlin.de> References: <20040831193654 DOT 74901 DOT qmail AT web20226 DOT mail DOT yahoo DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de cMhAsb0MH2vDkzd7ENQVBwdCpJDXo7/zjI1oxe5VXfSOEUi5NO User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en, de, fr, ru, zh, ja In-Reply-To: <20040831193654.74901.qmail@web20226.mail.yahoo.com> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk pradyut bhattacharya wrote: > i have wriiten a a simple program in c++ [...] > any help on writing the program correctly or a sample > hello world example would help Having fixed this to be legal C++ and compiling with 'gpp foo.C', it works: #include /* mha */ using namespace std; /* mha */ int main() /* mha */ { char a; cout << "Enter a alphabet: "; cin >> a; if (a == 'a') cout << "this is a vowel"; else if (a == 'e') cout << "this is a vowel"; else if (a == 'i') cout << "this is a vowel"; else if (a == 'o') cout << "this is a vowel"; else if (a == 'u') cout << "this is a vowel"; else cout << "this is not a vowel"; cout << endl; /* mha */ }