0
C++ error
#include <iostream> #include<cstdlib> using namespace std; int main(){ int x=0; int length=0; int number=0; cout<<"Enter password lenght"<<endl; cin>>length>>endl; for(x=0;x<=length;x++){ number=(rand()%9); cout<<number; } return 0; } CodeBlocks gives me the following error: fatal error: iostream: No such file or directory| Help?
2 Answers
+ 2
Have you saved your file with a .cpp extension?
I've fixed a few things in your code btw:
https://code.sololearn.com/cRDsY70k4wjq/?ref=app
0
yea it has the cpp extension. I am a beginner so I'm looking to do a more simplified version.@Zen