C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28695
Number of posts: 94715

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
C++ FIRST PROGRAM RUNNING PROBLEM Posted by kishor007 on 21 Nov 2012 at 12:59 AM
hi...

I am new to programming lenguage C++.
When i try to run following program in turboc++(ver 3.0)
1  // Fig. 2.1: fig02_01.cpp
 2  // Text-printing program.
 3  #include <iostream> // allows program to output data to the screen
 4
 5  // function main begins program execution
 6  int main()
 7  {
 8     std::cout << "Welcome to C++!\n"; // display message
 9
10     return 0; // indicate that program ended successfully
11
12  } // end function main

then it shows an error that.

FATAL FIRST.CPP 1:unable to create output file 'C:TURBOC3\SOURCE\FIRST.OBJ'

can anyone please help that why is this error is coming and how to
remove this error..


thanks in advance

Report
Re: C++ FIRST PROGRAM RUNNING PROBLEM Posted by Pelle-48 on 21 Nov 2012 at 5:55 AM
Test this program (it works with my Borland C++4):

// Fig. 2.1: fig02_01.cpp
// Text-printing program.
#include <iostream.h> // allows program to output data to the screen

// function main begins program execution
int main(void)
{
cout << "Welcome to C++!\n"; // display message

return 0; // indicate that program ended successfully

} // end function main

Report
Re: C++ FIRST PROGRAM RUNNING PROBLEM Posted by kishor007 on 21 Nov 2012 at 6:55 AM
but i want it to be run with my turbo c++(ver-3).plz help any suggestions that a error message is displaying..

Thanks for quick reply.
Report
Re: C++ FIRST PROGRAM RUNNING PROBLEM Posted by Pelle-48 on 21 Nov 2012 at 1:57 PM
Is my program working with your Turbo C++ version 3 ?
I have not seen any C or C++ with numbers starting each line.
I have not seen any STD::
Have you tested these?

Report
Re: C++ FIRST PROGRAM RUNNING PROBLEM Posted by kishor007 on 22 Nov 2012 at 9:20 PM
: Is my program working with your Turbo C++ version 3 ?
yes i try to run it but it is same as early not running.
: I have not seen any C or C++ with numbers starting each line.
these number are number from when i copy this from book in actual when i write this on turboc++ version-3 i eliminated numbers
: I have not seen any STD::
in next u can see this is actual code
1  // Fig. 2.1: fig02_01.cpp
 2  // Text-printing program.
 3  #include <iostream> // allows program to output data to the screen
 4
 5  // function main begins program execution
 6  int main()
 7  {
 8     std::cout << "Welcome to C++!\n"; // display message
 9
10     return 0; // indicate that program ended successfully
11
12  } // end function main

: Have you tested these?
all i tested but it is same problem??
:
:
help any further suggestion for this problem???

Report
Re: C++ FIRST PROGRAM RUNNING PROBLEM Posted by kishor007 on 22 Nov 2012 at 9:21 PM
: Is my program working with your Turbo C++ version 3 ?
yes i try to run it but it is same as early not running.
: I have not seen any C or C++ with numbers starting each line.
these number are number from when i copy this from book in actual when i write this on turboc++ version-3 i eliminated numbers
: I have not seen any STD::
in next u can see this is actual code
1  // Fig. 2.1: fig02_01.cpp
 2  // Text-printing program.
 3  #include <iostream> // allows program to output data to the screen
 4
 5  // function main begins program execution
 6  int main()
 7  {
 8     std::cout << "Welcome to C++!\n"; // display message
 9
10     return 0; // indicate that program ended successfully
11
12  } // end function main

: Have you tested these?
all i tested but it is same problem??
:
:
help any further suggestion for this problem???

Report
Re: C++ FIRST PROGRAM RUNNING PROBLEM Posted by kishor007 on 22 Nov 2012 at 9:26 PM
: Is my program working with your Turbo C++ version 3 ?
i try it but not working yet
: I have not seen any C or C++ with numbers starting each line.
just for programming lines start from copy from book
: I have not seen any STD::
In this this is actual code you can test it here
1  // Fig. 2.1: fig02_01.cpp
 2  // Text-printing program.
 3  #include <iostream> // allows program to output data to the screen
 4
 5  // function main begins program execution
 6  int main()
 7  {
 8     std::cout << "Welcome to C++!\n"; // display message
 9
10     return 0; // indicate that program ended successfully
11
12  } // end function main

: Have you tested these?
yes i tested these.But problem is as it is??
:
:
any further suggestion for this problem
Thanks for Quick reply

Report
Re: C++ FIRST PROGRAM RUNNING PROBLEM Posted by Pelle-48 on 23 Nov 2012 at 1:41 AM
Something must be wrong with your compiler.
I have downloaded Turbo C++ version 3.00 and it works with my code. Make a new free download and also download Borland C++ version 5.5 You should also test some code on Rosetta Code. It is a very good place for programmers and you can compare C++ with other languages.



 

Recent Jobs