error C2065: 'count' : undeclared identifier hatası

C, C++ ve C++ Builder ile ilgili konuları buraya yazabilirsiniz.
Cevapla
reyhan
Üye
Mesajlar: 25
Kayıt: 24 Kas 2014 10:46

error C2065: 'count' : undeclared identifier hatası

Mesaj gönderen reyhan »

Arkadaşlar kodu derlerken bu hatayı alıyorum nerede hatam acaba yardımcı olursanız sevinirim teşşekürler.

error C2065: 'count' : undeclared identifier
error C2143: syntax error : missing ';' before '{'



Kod: Tümünü seç

#include <iostream>
#include <string>
#include <windows.h>

using namespace std;

int main()
{
string input;
cout << "Enter \"L\" for Blocking and \"U\" for Unblocking "<< endl;
cin >> input;
input = tolower(input[0]);
if(input=="1")
{
system("color c");
system("Netsh interface ip set dns \"Local Area Connection\" static 208.67.222.123");
system("Netsh interface ip set dns \"Local Area Connection\" index=2 208.67.220.123");
count << "Protection is ON" << endl;
system("Pause");
}
else if(input=="u")
{
system("color a");
system("Netsh interface ip set dns \"Local Area Connection\" static 8.8.8.8");
system("Netsh interface ip set dns \"Local Area Connection\" index=2 8.8.4.4");
count << "Protection is Off" << endl;
system("Pause");
}
else
{
main{};
}
}  
Kullanıcı avatarı
SimaWB
Üye
Mesajlar: 1316
Kayıt: 07 May 2009 10:42
Konum: İstanbul
İletişim:

Re: error C2065: 'count' : undeclared identifier hatası

Mesaj gönderen SimaWB »

Aslında hata mesajında çok açık şekilde ifade edilmiş. "count diye bir değişken tanımlanmamış" diyor. Siz nerede count yazdığınıza bakarsanız aslında orada cout yazmanız gerekirken yanlış yazdığınızı görürsünüz.
There's no place like 127.0.0.1
reyhan
Üye
Mesajlar: 25
Kayıt: 24 Kas 2014 10:46

Re: error C2065: 'count' : undeclared identifier hatası

Mesaj gönderen reyhan »

çok teşekkür ederim yanlış yazmışım düzelttim
Cevapla