Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A-O-A sir i have made my 1st program of typing a text "Welcome to Virtual University"
#1
A-O-A sir i have made my 1st program of typing a text "Welcome to Virtual University" same as you told but when i compile it, it gives a message in line 4 where i use cout; in function 'int main()': 'cout'undeclared (first use this function) (each undeclared identifier is reported only once for each function it appears in)
Reply
#2
Dear Student,
You need to write the statement using namespace std; at the start of your program. After writing this line, you code should look like the one given below.

using namespace std;

#include <iostream>

main()
{
cout<<"Welcome to Virtual University!";
system("pause");
}
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  c++ program on unix varup 0 7,588 10-10-2012, 06:16 PM
Last Post: varup
  i take input from getchar(); function in program in C++ 2012 Vuhelper 0 3,001 05-31-2012, 01:40 AM
Last Post: Vuhelper
  program Output in C++ 2012 Vuhelper 0 2,965 01-06-2012, 12:28 AM
Last Post: Vuhelper
  For running C++ program from command prompt “gcc” and “g++” compilers are used. Vuhelper 0 6,393 01-04-2012, 10:41 PM
Last Post: Vuhelper
  Function (Retrun push)for what purpose use in the program. ? Vuhelper 0 1,862 11-05-2011, 05:03 PM
Last Post: Vuhelper
  C++ Help with Template class program 2011 Vuhelper 0 826 07-23-2011, 05:40 PM
Last Post: Vuhelper
  A simple pthread program runtime error in c++ 2011 Vuhelper 0 902 07-23-2011, 05:39 PM
Last Post: Vuhelper
  Problem with the complexity of the program 2011 Vuhelper 0 738 07-06-2011, 06:19 PM
Last Post: Vuhelper
  Write a calculator program using a do-while loop in c++ 2011 Vuhelper 0 2,775 06-27-2011, 06:41 PM
Last Post: Vuhelper
  Changing text color in c++ 2011 Vuhelper 0 1,161 06-19-2011, 06:06 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)