I tried compiling the following code and I get a warning on line 5 that this statement declares a non-template function but despite this warning the code does compile. However, it does not link. The error message from the linker is:
/tmp/ccIbnsNk.o:t2.C text+0x9b): undefined reference to `operator<<(std::basic_ostream >&, Array&)'
I feel the above code defines the function the linker says is undefined. What am I missing?
Thanks for the response. However, I added the line you suggested and it did not solve the problem. I believe the line you suggested tells the compiler that we want to specialize the implementation for the special case of int. However, I am not sure of my facts on this one.
can you help me how can i add the passenger constructor in the cpp file
this is the passenger constructor :
#include "Passenger.h"usingnamespace std;
Passenger::Passenger(string a="",string b="",long c=0)//Constructor that initializes the data members to given parameters
} //end constuctor Passenger body
but it seems i will have infinite No. of errors
when i got the last error i got another LNK2019 error with it, but i thought if i solve one of them the other will be solved also , and my thoughts was wrong
this is the other error :
1>Reservation.obj : error LNK2019: unresolved external symbol "public: class std::basic_string,class std::allocator > __thiscall Reservation::ID_sn(void)" (?ID_sn@Reservation@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "public: class std::basic_string,class std::allocator > __thiscall Reservation::getReservationNumber(void)" (?getReservationNumber@Reservation@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
I have three questions
1.why do I need to use of TEXT macro in my codes and if I remove it compiler shows error
2.why CreateProcess cant open test.txt while second parameter is command line and I have to write full path ("c:\\notepad.exe c:\\1.txt")
3.Do I need to use of WaitForSingleObject
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof (STARTUPINFO);
si.dwFlags = STARTF_USESHOWWINDOW |STARTF_TITLEISAPPID ;
si.wShowWindow = SW_SHOWMAXIMIZED;
I have a program in C++ compile with Visual Studio 2010. This program is to get data from joystick, this joystick will control robot in server pc.
in this client PC I have udp client server in C compile with gcc.
I need to pass data from joystick program to udp client program.
How can I do that? data is in char format, and input udp have the same format.
Make a socket connection and send the data, suitably formatted, to your client. I don't understand what the problem is here, transferring data between clients and servers is how the entire world is run these days.
One of these days I'm going to think of a really clever signature.
Last Visit: 31-Dec-99 18:00 Last Update: 13-Oct-15 0:59