Author Topic: File Save  (Read 6964 times)

Offline Alienspecimen

  • Single posting newcomer
  • *
  • Posts: 5
File Save
« on: June 15, 2015, 06:22:38 pm »
Go ahead, laugh all you want...:)

Through searching this website, I found out that the error I am getting "#iostream file not found" upon typing in my first program is caused by me saving the file in the wrong format. Unfortunately, I dont see a way to save it in the right format.

I open a new project which is supposed to be a C++ console application. I do see the "Main.cpp" which contains "Hello world" code, but instead of using it, I open up a new file. The program asks me if this is a C/C++ file and I click "yes" upon which, the file is saved as "whatever_name_I_choose.c"

Why would CB save files with a .c extention in C++ projects? How do I change the extension of the file from .c to .cpp?

Thanks in advance.

B.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: File Save
« Reply #1 on: June 15, 2015, 09:04:26 pm »
"File -> Save as" or, when the file is closed, right click the file in the projects tree and chose "Rename" .

Offline Alienspecimen

  • Single posting newcomer
  • *
  • Posts: 5
Re: File Save
« Reply #2 on: June 16, 2015, 03:56:27 am »
Thank you for your reply, Jens.

I missed the part that the file needs to be closed at first.

It also looks like I was saving a new empty file, but still dont understand why it saves as a .c file within a C++ project. Can anyone, please explain?

Thanks

Best

B.

P.S. New->File->C/C++Source saves as .cpp automatically.
« Last Edit: June 16, 2015, 04:11:09 am by Alienspecimen »