Jump to content
357mag

This is a change

Recommended Posts

In previous versions of C++ Builder, I remember having to use the include<conio.h> header file. Plus to keep the console window open I had to put getch() at the end of my source file. Now I just copied a .cpp file which was made in Visual Studio, and I pasted it into a source file in C++ Builder. I didn't think it would run, but it did with no complaints from the compiler.

 

I did not include the <conio.h> file nor did I have to place a getch() at the end.

 

C++ builder simply ran the file just fine.

 

Did Embarcadero change some things? I'm using the Community Edition 12.

Share this post


Link to post

To get any chance of an answer you need to post some code that behaves differently between two versions. Also check which compiler and target (win32 or 64bit) you are using in each case.

 

Share this post


Link to post
8 hours ago, 357mag said:

In previous versions of C++ Builder, I remember having to use the include<conio.h> header file.

That is an extremely old header file for DOS development.  If you are using C++ iostreams for console I/O (as you should be, ie std::cin and std::cout) then you don't need that header.

8 hours ago, 357mag said:

Plus to keep the console window open I had to put getch() at the end of my source file.

Or std::cin.get().  But yes, to keep the window open, you have to wait for user input.  Otherwise, open the console window first before then running the program in it.  The window closes automatically only if the program launched the window in the first place.  When you run a console program directly, it creates a new console window for itself.

8 hours ago, 357mag said:

Did Embarcadero change some things?

Not that I'm aware of.  But without seeing the actual code, it is difficult to explain what you are experiencing.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×