prog.cpp:11:11: error: ‘::main’ must return ‘int’
void main()
^
prog.cpp: In function ‘int main()’:
prog.cpp:13:8: error: ‘pipe1’ was not declared in this scope
read(pipe1[0], & smsg, sizeof(S_DATA));
^
prog.cpp:13:20: error: ‘smsg’ was not declared in this scope
read(pipe1[0], & smsg, sizeof(S_DATA));
^
prog.cpp:13:33: error: ‘S_DATA’ was not declared in this scope
read(pipe1[0], & smsg, sizeof(S_DATA));
^
prog.cpp:13:40: error: ‘read’ was not declared in this scope
read(pipe1[0], & smsg, sizeof(S_DATA));
^
prog.cpp: In function ‘void write()’:
prog.cpp:36:3: error: ‘ofstream’ was not declared in this scope
ofstream write(" Path/Data.txt", std::ofstream::app);
^
prog.cpp:36:3: note: suggested alternative:
In file included from /usr/include/c++/4.8/ios:38:0,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from prog.cpp:1:
/usr/include/c++/4.8/iosfwd:160:34: note: ‘std::ofstream’
typedef basic_ofstream<char> ofstream;
^
prog.cpp:36:12: error: expected ‘;’ before ‘write’
ofstream write(" Path/Data.txt", std::ofstream::app);
^
prog.cpp:37:13: error: request for member ‘is_open’ in ‘write’, which is of non-class type ‘void()’
if (write.is_open()){
^
prog.cpp:38:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0; i<vfdata.size(); i++){
^
prog.cpp:39:22: error: invalid operands of types ‘void()’ and ‘__gnu_cxx::__alloc_traits<std::allocator<float> >::value_type {aka float}’ to binary ‘operator<<’
write<<vfdata[i];
^
prog.cpp:41:11: error: request for member ‘close’ in ‘write’, which is of non-class type ‘void()’
write.close();
^
prog.cpp:44:17: error: expected ‘}’ at end of input
void write(void);
^