| | |
Help ! C++ Compiler Not WOrking
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
I use Turbo C++ compiler to compile Cpp program.
when i use it . shows error( undef :"cout " "endl") but included CONIO.h . Also I checked OPTIONS-> DIR - where I have TC Folder(My case I have it in E:\TC\INCLUDE & E:\TC\LIB) Even The Example Programs is Not Running . It Doesn't Recosing the Header files .
Please Help me .
Please Send Me some Guide lines .
when i use it . shows error( undef :"cout " "endl") but included CONIO.h . Also I checked OPTIONS-> DIR - where I have TC Folder(My case I have it in E:\TC\INCLUDE & E:\TC\LIB) Even The Example Programs is Not Running . It Doesn't Recosing the Header files .
Please Help me .
Please Send Me some Guide lines .
It was Just a Basic Program to Find Greates Three No ;
Here is :
#include<stdio.h>
#include<conio.h>
int main()
{
int a[3];
int s=3;
int i,j,temp;
for(i=0;i<s;i++)
cout<<a[i]<<" ";
cout<<endl;
for(i=0;i<s;i++)
/*
int idx;
char str[STRINGLENGTH];
int numbersfound = 0;
int dotsfound = 0;
for (idx=0; (idx<STRINGLENGTH) && (str[idx]); idx++){
numbersfound += ((str[idx] >= '0') && (str[idx] <= '9'));
dotsfound += (str[idx] == '.');
}
if (numbersfound == STRINGLENGTH)
printf("integer");
else if ((dotsfound == 1) && (numbersfound == STRINGLENGTH-1))
printf("floating point");
else
printf("string");
*/
for(j=0;j<(s-i);j++)
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
for(i=0;i<s;i++)
cout<<a[i]<<" ";
cout<<endl;
getchar();
return 1;
}
Here is :
#include<stdio.h>
#include<conio.h>
int main()
{
int a[3];
int s=3;
int i,j,temp;
for(i=0;i<s;i++)
cout<<a[i]<<" ";
cout<<endl;
for(i=0;i<s;i++)
/*
int idx;
char str[STRINGLENGTH];
int numbersfound = 0;
int dotsfound = 0;
for (idx=0; (idx<STRINGLENGTH) && (str[idx]); idx++){
numbersfound += ((str[idx] >= '0') && (str[idx] <= '9'));
dotsfound += (str[idx] == '.');
}
if (numbersfound == STRINGLENGTH)
printf("integer");
else if ((dotsfound == 1) && (numbersfound == STRINGLENGTH-1))
printf("floating point");
else
printf("string");
*/
for(j=0;j<(s-i);j++)
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
for(i=0;i<s;i++)
cout<<a[i]<<" ";
cout<<endl;
getchar();
return 1;
}
Sir while I Compile it shows this error :
e:\psgitd~1\finals~1\greatest.cpp:9: `cout' undeclared (first use this function)
e:\psgitd~1\finals~1\greatest.cpp:9: (Each undeclared identifier is reported only once
e:\psgitd~1\finals~1\greatest.cpp:9: for each function it appears in.)
e:\psgitd~1\finals~1\greatest.cpp:10: `endl' undeclared (first use this function)
e:\psgitd~1\finals~1\greatest.cpp:9: `cout' undeclared (first use this function)
e:\psgitd~1\finals~1\greatest.cpp:9: (Each undeclared identifier is reported only once
e:\psgitd~1\finals~1\greatest.cpp:9: for each function it appears in.)
e:\psgitd~1\finals~1\greatest.cpp:10: `endl' undeclared (first use this function)
Last edited by ninja_gs; Dec 11th, 2008 at 6:18 am.
K thanks 4 ur Kind Help
I was Just a beginer
And I will DO it Carefuly
Sir My Goal
is to Get 3 inputs from user
and Find the Greatest of all
and list out it
but matter of fact the Big deal is
the INPUT may be int or may be float or char
1st i need figurout the ds of input and the find greatest .
This is my point,
Any Suggestion Sir
I was Just a beginer
And I will DO it Carefuly
Sir My Goal
is to Get 3 inputs from user
and Find the Greatest of all
and list out it
but matter of fact the Big deal is
the INPUT may be int or may be float or char
1st i need figurout the ds of input and the find greatest .
This is my point,
Any Suggestion Sir
Last edited by ninja_gs; Dec 11th, 2008 at 6:44 am.
Okay ,
C++ Syntax (Toggle Plain Text)
#include<iostream.h> #include<stdio.h> #include<conio.h> void main() { int a[3]; int s=3; int i,j,temp; for(i=0;i<s;i++) cout<<a[i]<<" "; cout<<endl; for(i=0;i<s;i++) /* int idx; char str[STRINGLENGTH]; int numbersfound = 0; int dotsfound = 0; for (idx=0; (idx<STRINGLENGTH) && (str[idx]); idx++){ numbersfound += ((str[idx] >= '0') && (str[idx] <= '9')); dotsfound += (str[idx] == '.'); } if (numbersfound == STRINGLENGTH) printf("integer"); else if ((dotsfound == 1) && (numbersfound == STRINGLENGTH-1)) printf("floating point"); else printf("string"); */ for(j=0;j<(s-i);j++) if(a[j]>a[j+1]) { temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } for(i=0;i<s;i++) cout<<a[i]<<" "; cout<<endl; getchar(); return 1; }
Last edited by Ancient Dragon; Dec 11th, 2008 at 7:48 pm. Reason: add code tags
![]() |
Similar Threads
- Best C++ compiler (C++)
- system command not working in C functions.pls help (C)
- Java Compiler not working (Java)
- Java Causes IE to Crash...Java not working (Web Browsers)
- Code is written, but not working. (Java)
- compilers for c++ (C++)
Other Threads in the C++ Forum
- Previous Thread: Help with read file program to round numbers
- Next Thread: Getting error when calling function from main()
| Thread Tools | Search this Thread |
api application array arrays based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg simple sorting string strings temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






