0

Getting error what is the reason

***#include <iostream> using namespace std; int main() { int num = 1; while (num < 6) { cout << "Number: " << num << endl; num = num + 3; } return 0; }*** this is the code and I tried to run this on turbo c++ version 3.0 getting error "unable to open instream file" and "undefined symbol cout" in the last " undefined symbol endl"

6th May 2018, 6:39 PM
Laukesh singh
Laukesh singh - avatar
6 ответов
+ 2
sure I'll try and will notify that it works or not 😊
6th May 2018, 8:23 PM
Laukesh singh
Laukesh singh - avatar
+ 2
I tried and it works fine thanks I'll try to make my teacher's to use updated software even if it require to teach them about software I'll try to do 🤗.
7th May 2018, 4:15 PM
Laukesh singh
Laukesh singh - avatar
+ 1
yeah 😉
7th May 2018, 6:16 PM
Laukesh singh
Laukesh singh - avatar
0
that I put for clarify that start and end of program 😅 I didn't put them while programming
6th May 2018, 6:43 PM
Laukesh singh
Laukesh singh - avatar
0
You are using old Turbo C++ ide, so try this... 1. in header file, change from #include<iostream> to #include<iostream.h> 2. there may be chances that you can remove the second line using namespace std; But try with and without, so you know if its making any effect or not. Rest of the code is ok. Kindly comment back to tell if it works or if it doesn't. If it does, download CODE::BLOCKS ide. No one use Turbo C++ now, instead of indian education system (sad).
6th May 2018, 7:39 PM
Harjeet Singh
Harjeet Singh - avatar
0
Laukesh Singh 👍👌
7th May 2018, 4:18 PM
Harjeet Singh
Harjeet Singh - avatar