- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
What I can do to solve this?
root@ubuntu:/opt/intel/cc/10.1.018/bin# ./icc teste.c
teste.c(1): catastrophic error: could not open source file "iostream.h"
#include
^
compilation aborted for teste.c (code 4)
teste.c Code:
#include
int mult (int x, int y) {
int result;
result = 0;
while (y != 0) {
result = result + x;
y = y - 1;
}
return(result);
}
int main () {
int x, y;
cout << "Enter two natural numbers: ";
cin >> x >> y;
cout << x << " * " << y << " = " << mult(x,y) << endl;
return(0);
}
I'm using: Ubuntu 8,10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
teste.c(17): error: identifier "cout" is undefined
cout << "Enter two natural numbers: ";
^
teste.c(18): error: identifier "cin" is undefined
cin >> x >> y;
^
teste.c(19): error: identifier "endl" is undefined
cout << x << " * " << y << " = " << mult(x,y) << endl;
You didn't show your code example. My guess is you omitted
using namespace std;
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
I change iostream.h for iostream. And use ./icpc teste.c
But...
root@ubuntu:/opt/intel/cc/10.1.018/bin# ./icpc teste.c
teste.c(17): error: identifier "cout" is undefined
cout << "Enter two natural numbers: ";
^
teste.c(18): error: identifier "cin" is undefined
cin >> x >> y;
^
teste.c(19): error: identifier "endl" is undefined
cout << x << " * " << y << " = " << mult(x,y) << endl;
^
compilation aborted for teste.c (code 2)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
teste.c(17): error: identifier "cout" is undefined
cout << "Enter two natural numbers: ";
^
teste.c(18): error: identifier "cin" is undefined
cin >> x >> y;
^
teste.c(19): error: identifier "endl" is undefined
cout << x << " * " << y << " = " << mult(x,y) << endl;
You didn't show your code example. My guess is you omitted
using namespace std;
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page