Zaczynam powoli naukę tego właśnie języka. Jak na razie jestem bardzo początkujący.
void main()
{
int nLiczba;
std::cout << "Wprowadz liczbe wieksza od 6: ";
std::cin >> nLiczba;
if (nLiczba > 6)
{
std::cout << "Dobrze, dziekuje." << std::endl;
std::cout << "Wcisnij dowolny klawisz, by zakonczyc.";
}
else
{
std::cout << "Liczba " << nLiczba
<< " nie jest wieksza od 6." << std::endl;
std::cout << "Jak sie nauczysz liczb, sprobuj jeszcze raz";
}
getch();
}
CO JEST ŹLE???
Oto błędy:
------ Build started: Project: d, Configuration: Debug Win32 ------
Compiling...
f.cpp
d:\c++\projects\d\d\f.cpp(4) : error C2653: 'std' : is not a class or namespace name
d:\c++\projects\d\d\f.cpp(4) : error C2065: 'cout' : undeclared identifier
d:\c++\projects\d\d\f.cpp(5) : error C2653: 'std' : is not a class or namespace name
d:\c++\projects\d\d\f.cpp(5) : error C2065: 'cin' : undeclared identifier
d:\c++\projects\d\d\f.cpp(8) : error C2653: 'std' : is not a class or namespace name
d:\c++\projects\d\d\f.cpp(8) : error C2653: 'std' : is not a class or namespace name
d:\c++\projects\d\d\f.cpp(8) : error C2065: 'endl' : undeclared identifier
d:\c++\projects\d\d\f.cpp(9) : error C2653: 'std' : is not a class or namespace name
d:\c++\projects\d\d\f.cpp(13) : error C2653: 'std' : is not a class or namespace name
d:\c++\projects\d\d\f.cpp(14) : error C2653: 'std' : is not a class or namespace name
d:\c++\projects\d\d\f.cpp(15) : error C2653: 'std' : is not a class or namespace name
d:\c++\projects\d\d\f.cpp(17) : error C3861: 'getch': identifier not found
Build log was saved at "file://d:\C++\Projects\d\d\Debug\BuildLog.htm"
d - 12 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========