Sydatolo
Decapat
- Katılım
- 30 Nisan 2021
- Mesajlar
- 210
- Makaleler
- 1
Daha fazla
- Cinsiyet
- Erkek
- Meslek
- Öğrenci
[CODE lang="cpp" title="C++:" highlight="1-18"]#include<iostream>
#include<conio.h>
#include<windows.h>
#include<fstream>
#define renk system("color a");
int main(){
renk
while(1){
for(int i=0;i<2193817236812293;i++){
char a;
a=getchar();
std::cout<<a;
ofstream dosya01("kayit.txt");
dosya01<<a;
}
}
return 0;
}[/CODE]
Bu C++ kodunda:
Bu hatayı veriyor.
Hatamı anlamadım, yardım olabilecek birisi var mı?
#include<conio.h>
#include<windows.h>
#include<fstream>
#define renk system("color a");
int main(){
renk
while(1){
for(int i=0;i<2193817236812293;i++){
char a;
a=getchar();
std::cout<<a;
ofstream dosya01("kayit.txt");
dosya01<<a;
}
}
return 0;
}[/CODE]
Bu C++ kodunda:
main.cpp: In function 'int main()': main.cpp:13:13: error: 'ofstream' was not declared in this scope ofstream dosya01[i]("keyloggerkayit.txt"); ^~~~~~~~ main.cpp:13:13: note: suggested alternative: In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\ios:38:0, from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\ostream:38, from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\iostream:39, from main.cpp:1: c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\iosfwd:165:34: note: 'std::ofstream' typedef basic_ofstream<char> ofstream; ^~~~~~~~ main.cpp:14:13: error: 'dosya01' was not declared in this scope dosya01[i]<<a[i]; ^~~~~~~
Bu hatayı veriyor.
Hatamı anlamadım, yardım olabilecek birisi var mı?
Son düzenleyen: Moderatör: