|< 1 2 >| | 14 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
#include <string>
int main(){
string test, test2;
cin >> test;
cout<<test<<endl;
cout<<test2;
return 0;
};
getline(cin,test);
cin.getline(test,200)
Quote\n\n~/Tests/cpp 49> g++ Address.cpp
Address.cpp: In member function `bool Address::scan()':
Address.cpp:29: no matching function for call to `std::basic_istream<char,
std::char_traits<char> >::getline(std::string&, int)'
/usr/local/include/g++-v3/bits/istream.tcc:658: candidates are:
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT,
_Traits>::getline(_CharT*, int, _CharT) [with _CharT = char, _Traits =
std::char_traits<char>]
/usr/local/include/g++-v3/istream:176:
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT,
_Traits>::getline(_CharT*, int) [with _CharT = char, _Traits =
std::char_traits<char>]
1
2
3
4
5
char ae = 'ä';
if(ae == -5) printf("(ae == -5) okay\n");
if(((unsigned char)ae) == 132) printf("(((unsigned char)ae) == 132) okay\n");
if(ae < 0) printf("(ae < 0) okay\n");
if(ae & 128) printf("(ae & 128) okay\n");
[E|B,14.06.2004, 21:35]Und darf ich, beim Includen, auch die Header-Endung weglassen? Oder nur bei C++? Wie sieht das aus?
#include "stdio.h"
#include <cstdio>
#include <stdio.h>
|< 1 2 >| | 14 Einträge, 2 Seiten |