Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 10th, 2005, 6:51 PM   #1
rymas
Newbie
 
Join Date: Jan 2005
Posts: 7
Rep Power: 0 rymas is on a distinguished road
problem with c++ builder compilation

I have just started to learn Borland c++ builder 6 from a book and I was going on well at the beginning when the book examples were running correctly but suddenly I don't know what happened to the c++ builder , it began to give me strange errors on very simple programs even the programs that I have already ran before correctly . I hope anyone could tell me how to get the builder running correctly again!
The problem appeared in using console applications
I just choose new->other->console wizard->and from the dialog box I mark c++ and console application.
then when the code window appears at first time I press run it runs but whenever I include any header file (like iostream) many errors appear and a new tab called c_locale.h also appears beside the tab called unit1.cpp in the code editor with many lines and as an example of the errors:
[C++ Error] c_locale.h(364): E2187 Unexpected end of file in conditional started on line 260
[C++ Error] c_locale.h(365): E2187 Unexpected end of file in conditional started on line 364
[C++ Error] c_locale.h(366): E2187 Unexpected end of file in conditional started on line 365

all these errors and more appeared when I just added the iostream statement together with the namespace statement in the following program although the same program worked before:
//-----------------------------------------------------------------------
#include <iostream>
using namespace std;
#pragma hdrstop

//----------------------------------------------------------------------

#pragma argsused
int main(int argc, char* argv[])
{

        return 0;
}
//----------------------------------------------------------------------

I tried to replace the first two statements with :
#include<iostream.h>
but this did not work either
I don't know what happened to the compiler ..I tried to re-install it but nothing changed
please help me!!
rymas is offline   Reply With Quote
Old Jul 10th, 2005, 10:40 PM   #2
rymas
Newbie
 
Join Date: Jan 2005
Posts: 7
Rep Power: 0 rymas is on a distinguished road
finally..........solved!

finally I found out where the problem was
It was just that I didn't change the project options to convert the compiler from ANSI to Borland compatible !!!
Thanks for everyone who passed by..
rymas is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:31 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC