1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
g++ -Wall -fexceptions -O2 -std=c++11 -m64 -fpermissive -c /opt/projects/cb/cbs2/cbs/getchoice.cpp -o obj/Release/getchoice.o
g++ -Wall -fexceptions -O2 -std=c++11 -m64 -fpermissive -c /opt/projects/cb/cbs2/cbs/main.cpp -o obj/Release/main.o
g++ -o bin/Release/cbs obj/Release/getchoice.o obj/Release/main.o -s -m64
In file included from /usr/include/c++/4.8.2/sstream:38:0,
from /usr/include/c++/4.8.2/complex:45,
from /usr/include/c++/4.8.2/ccomplex:38,
from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/stdc++.h:52,
from /opt/projects/cb/cbs2/cbs/getchoice.h:4,
from /opt/projects/cb/cbs2/cbs/getchoice.cpp:1:
/usr/include/c++/4.8.2/istream: In constructor ‘GetChoice::GetChoice()’:
/usr/include/c++/4.8.2/istream:606:7: error: ‘std::basic_istream<_CharT, _Traits>::basic_istream() [with _CharT = char; _Traits = std::char_traits<char>]’ is protected
basic_istream()
^
/opt/projects/cb/cbs2/cbs/getchoice.cpp:6:22: error: within this context
GetChoice::GetChoice()
^
In file included from /usr/include/c++/4.8.2/istream:39:0,
from /usr/include/c++/4.8.2/sstream:38,
from /usr/include/c++/4.8.2/complex:45,
from /usr/include/c++/4.8.2/ccomplex:38,
from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/stdc++.h:52,
from /opt/projects/cb/cbs2/cbs/getchoice.h:4,
from /opt/projects/cb/cbs2/cbs/getchoice.cpp:1:
/usr/include/c++/4.8.2/ostream:384:7: error: ‘std::basic_ostream<_CharT, _Traits>::basic_ostream() [with _CharT = char; _Traits = std::char_traits<char>]’ is protected
basic_ostream()
^
/opt/projects/cb/cbs2/cbs/getchoice.cpp:6:22: error: within this context
GetChoice::GetChoice()
^
/opt/projects/cb/cbs2/cbs/getchoice.cpp: In member function ‘int GetChoice::getchoice_r(std::vector<std::basic_string<char> >&, std::istream*, std::ostream*)’:
/opt/projects/cb/cbs2/cbs/getchoice.cpp:67:33: warning: invalid user-defined conversion from ‘std::istream {aka std::basic_istream<char>}’ to ‘FILE* {aka _IO_FILE*}’ [-fpermissive]
getline(&ch, &n, *in);
^
In file included from /usr/include/c++/4.8.2/ios:44:0,
from /usr/include/c++/4.8.2/istream:38,
from /usr/include/c++/4.8.2/sstream:38,
from /usr/include/c++/4.8.2/complex:45,
from /usr/include/c++/4.8.2/ccomplex:38,
from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/stdc++.h:52,
from /opt/projects/cb/cbs2/cbs/getchoice.h:4,
from /opt/projects/cb/cbs2/cbs/getchoice.cpp:1:
/usr/include/c++/4.8.2/bits/basic_ios.h:115:7: note: candidate is: std::basic_ios<_CharT, _Traits>::operator void*() const [with _CharT = char; _Traits = std::char_traits<char>] <near match>
operator void*() const
^
/usr/include/c++/4.8.2/bits/basic_ios.h:115:7: note: no known conversion for implicit ‘this’ parameter from ‘void*’ to ‘FILE* {aka _IO_FILE*}’
/opt/projects/cb/cbs2/cbs/getchoice.cpp:31:24: warning: unused variable ‘len’ [-Wunused-variable]
int i, j, k, l, m, len;
^
/opt/projects/cb/cbs2/cbs/getchoice.cpp:35:11: warning: unused variable ‘p’ [-Wunused-variable]
char *p, *wp;
^
In file included from /usr/include/c++/4.8.2/iostream:40:0,
from /opt/projects/cb/cbs2/cbs/main.cpp:1:
/usr/include/c++/4.8.2/istream: In function ‘int main()’:
/usr/include/c++/4.8.2/istream:606:7: error: ‘std::basic_istream<_CharT, _Traits>::basic_istream() [with _CharT = char; _Traits = std::char_traits<char>]’ is protected
basic_istream()
^
/opt/projects/cb/cbs2/cbs/main.cpp:12:13: error: within this context
istream in;
^
In file included from /usr/include/c++/4.8.2/iostream:39:0,
from /opt/projects/cb/cbs2/cbs/main.cpp:1:
/usr/include/c++/4.8.2/ostream:384:7: error: ‘std::basic_ostream<_CharT, _Traits>::basic_ostream() [with _CharT = char; _Traits = std::char_traits<char>]’ is protected
basic_ostream()
^
/opt/projects/cb/cbs2/cbs/main.cpp:13:13: error: within this context
ostream out;
^
/opt/projects/cb/cbs2/cbs/main.cpp:16:56: error: no matching function for call to ‘GetChoice::getchoice_r(std::vector<std::basic_string<char> >*&, std::istream*, std::ostream*)’
cho->getchoice_r(cho->menu, &(cho->in), &(cho->out));
^
/opt/projects/cb/cbs2/cbs/main.cpp:16:56: note: candidate is:
In file included from /opt/projects/cb/cbs2/cbs/main.cpp:2:0:
/opt/projects/cb/cbs2/cbs/getchoice.h:38:9: note: int GetChoice::getchoice_r(std::vector<std::basic_string<char> >&, std::istream*, std::ostream*)
int getchoice_r(vector<string>&choices,istream *in ,ostream *out);
^
/opt/projects/cb/cbs2/cbs/getchoice.h:38:9: note: no known conversion for argument 1 from ‘std::vector<std::basic_string<char> >*’ to ‘std::vector<std::basic_string<char> >&’
/opt/projects/cb/cbs2/cbs/main.cpp:9:21: warning: unused variable ‘choice’ [-Wunused-variable]
vector<string> *choice;
^
/opt/projects/cb/cbs2/cbs/main.cpp:10:21: warning: unused variable ‘menu’ [-Wunused-variable]
vector<string> *menu;
^
Process terminated with status 1 (0 minute(s), 0 second(s))
/opt/projects/cb/cbs2/cbs/getchoice.cpp:35:15: warning: unused variable ‘wp’ [-Wunused-variable]
char *p, *wp;
^
/opt/projects/cb/cbs2/cbs/getchoice.cpp:40:1: warning: label ‘LABEL1’ defined but not used [-Wunused-label]
LABEL1: do {
^
Process terminated with status 1 (0 minute(s), 0 second(s))
9 error(s), 7 warning(s) (0 minute(s), 0 second(s))
|