Kod :
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
cout <<"pierwsza linijka";
getchar();
cout <<"druga linijka";
getchar();
cout <<"trzecia linijka";
getchar();
return 0;
}
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
cout <<"pierwsza linijka";
getchar();
cout <<"druga linijka";
getchar();
cout <<"trzecia linijka";
getchar();
return 0;
}
Problem z komputerem? Instrukcja diagnostyczna
Cytat został ukryty, ponieważ ignorujesz tego użytkownika. Pokaż cytat."Don't worry, I'm just a pervert"Cytat został ukryty, ponieważ ignorujesz tego użytkownika. Pokaż cytat.
// Functions – przykład własnych funkcji
#include <iostream>
#include <conio.h>
void PokazTekst1()
{
std::cout << "Umiem juz pisac wlasne funkcje! :)" << std::endl;
_getch();
}
void PokazTekst2()
{
std::cout << "Umiem juz pisac wlasne funkcje! :)" << std::endl;
_getch();
}
void PokazTekst3()
{
std::cout << "Umiem juz pisac wlasne funkcje! :)" << std::endl;
_getch();
}
void main()
{
PokazTekst1();
PokazTekst2();
PokazTekst3();
_getch();
}
// Else – blok alternatywny w instrukcji if
void main()
{
int nLiczba;
std::cout << "Wprowadz liczbe wieksza od 10: ";
std::cin >> nLiczba;
if (nLiczba > 10)
{
std::cout << "Dziekuje." << std::endl;
std::cout << "Wcisnij dowolny klawisz, by zakonczyc.";
}
else
{
std::cout << "Liczba " << nLiczba
<< " nie jest wieksza od 10." << std::endl;
std::cout << "Czuj sie upomniany :P";
}
getch();
}
------ Build started: Project: First, Configuration: Debug Win32 ------
Main.cpp
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(5): error C2039: 'cout' : is not a member of 'std'
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(5): error C2065: 'cout' : undeclared identifier
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(6): error C2039: 'cin' : is not a member of 'std'
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(6): error C2065: 'cin' : undeclared identifier
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(9): error C2039: 'cout' : is not a member of 'std'
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(9): error C2065: 'cout' : undeclared identifier
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(9): error C2039: 'endl' : is not a member of 'std'
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(9): error C2065: 'endl' : undeclared identifier
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(10): error C2039: 'cout' : is not a member of 'std'
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(10): error C2065: 'cout' : undeclared identifier
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(14): error C2039: 'cout' : is not a member of 'std'
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(14): error C2065: 'cout' : undeclared identifier
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(15): error C2039: 'endl' : is not a member of 'std'
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(15): error C2065: 'endl' : undeclared identifier
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(16): error C2039: 'cout' : is not a member of 'std'
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(16): error C2065: 'cout' : undeclared identifier
c:\documents and settings\michał\moje dokumenty\visual studio 2010\projects\first\first\main.cpp(18): error C3861: 'getch': identifier not found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Ostatnio zmieniony przez Gray : 27-01-2012, 21:21
#include<iostream>
int main()
{
using namespace std;
int a, b, c;
cout << "Szescian liczby(3): " << endl;
cin >> a;
a = a;
b = a;
c = a;
cout << "Wynik to:" << a * b * c << endl;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
string s("title dupa");
system(s.c_str());
s="pause";
system(s.c_str());
return 0;
}
Ostatnio zmieniony przez Absherr : 29-01-2012, 15:03
c=b=a;
a = a;
b = a;
c = a;
Ostatnio zmieniony przez niemoralny : 29-01-2012, 14:50
a = a;
b = a;
c = a;
c = b = a;
int a = 0;
int b = -1;
int c = -1;
c=b=a;
cout<<a<<b<<c<<"\n";
b=a;
c=b;
Aktualnie 1 użytkowników przegląda ten temat. (0 użytkowników i 1 gości)
Zakładki