|
My PCs(server and client) are on LAN. Whenever I try to connect by using the Local address everthing works fine. But when I try to connect by providing the web address(dynamic address) provided to my PCs by ISP I am unable to connect. I enter this dynamic ip in the config file as mentioned in this article. One more thing which I would like to mention is that the application only detects the local ip address and not the one provided by ISP.
Shweta
|
|
|
|
|
Try using gethostbyname() instead of gethostbyaddr. Pass the server ip adress to gethostbyname().
Alternatively you can also use getnameinfo(). gethostbyaddr may eventually resort to using NetBIOS (port 137) to come up with the name. According to MSDN, gethostbyaddr is actually deprecated by the getnameinfo API. getnameinfo does a reverse lookup of an IP Address without using NetBIOS.
-Narad
|
|
|
|
|
Hello Friends,
Actually I am try to develop the Application to manage my browsing center. I need given points
1. How many system currently connect to the internet
2. If the no of system connected, how long the system continue this connect.(when login/logout)
3. If the system is conneted, list out the user name.
4. If the user used printer, How many pages they printed.
5. If the user used cd-writer, How many CDs they writed.
Please send any helps tips my id or display FAQ Page
|
|
|
|
|
I really want to use this code to build a prototype project but I have been killed by all the compile issues. I have gone into the source and edited the #include to get past some erors only to get stopped with new ones. How did this ever compile?
What we all need is a set of source code in the correct directroy structure and the step by stpe process to set up the Microsoft CLI VC++ compiler so it works. The #include file.H references all have to be changed and then you get to new problems.
I have spent considerable time time trying to compile my way through this and it is not going well.
I would appreciate any information you have to use this code.
Regards
MC
MC
|
|
|
|
|
Mike,
Could you please show me show error messages when you do the compile?
|
|
|
|
|
Before I provide the error messages:
I have noticed more that one location to download your code from this site and the documentation is also differnet. How does one get the latest version?
It would also be exteeemly helpfull to have same directory structure you used to complile from along with any compiler options. Include file help or notes would be appriciated as well. Is there another FTP site?
I was hoping to get a runing start at a prototype project and not hae to do all the basicallly do all the same things you code provides
I have not modified all of the moudles to point to a single source folder yet and could be the cause of some of the errors but here is where I am at the moment. I am assuming most of these errors will resolve with the appropriate includes and folder refernces.
I compiled two programs: MyLog and MyClient.
Thanks for responding.
Mike C
Compiler and set up: Microsoft Visual C++ Tool Kit 2003 (CLI).
Compiler installed in default Program Files\...\.
VCVARS32.bat executed for Includes (see below)
C:\Program Files\Microsoft Visual C++ Toolkit 2003>set include
INCLUDE=C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;C:\Program Fi
les\Microsoft Platform SDK\Include;C:\Program Files\Microsoft Visual Studio .NET
\FrameworkSDK\include\
//////////////////////////////////////////////////////////
All source for Client located in c:\Client\
The first problem was all the error messages that are genrated without the /EHs option set.
Next I received file not found errors on all the #include(s) that refer to a directory structure that is not how the code is downloaded.
I basically modified the code from:
#include "..\mySocket\mySocket.h"
#include "..\myLog\myLog.h"
#include "..\myException\myException.h"
#include "..\myHostInfo\myHostInfo.h"
to:
#include "mySocket.h"
#include "myLog.h"
#include "myException.h"
#include "myHostInfo.h"
/////////////////////////////////////////////////
OUTPUT from MyLog compile:
C:\client>cl mylog.cpp /EHs
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
mylog.cpp
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.
/out:mylog.exe
mylog.obj
LIBC.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced
in function _mainCRTStartup
mylog.exe : fatal error LNK1120: 1 unresolved externals
/////////////////////////////////////////////////////////////////////////
OUTPUT form MyClinet
C:\client>cl myclient.cpp /EHs
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
myclient.cpp
c:\client\myHostInfo.h(28) : error C2871: 'std' : a namespace with this name doe
s not exist
c:\client\myHostInfo.h(68) : error C2143: syntax error : missing ')' before '&'
c:\client\myHostInfo.h(68) : error C2143: syntax error : missing ';' before '&'
c:\client\myHostInfo.h(68) : error C2460: 'myHostInfo::string' : uses 'myHostInf
o', which is being defined
c:\client\myHostInfo.h(52) : see declaration of 'myHostInfo'
c:\client\myHostInfo.h(68) : error C2501: 'myHostInfo::hostName' : missing stora
ge-class or type specifiers
c:\client\myHostInfo.h(68) : error C2146: syntax error : missing ';' before iden
tifier 'type'
c:\client\myHostInfo.h(68) : error C2501: 'myHostInfo::hostType' : missing stora
ge-class or type specifiers
c:\client\myHostInfo.h(68) : error C2059: syntax error : ')'
c:\client\myHostInfo.h(68) : error C2501: 'myHostInfo::type' : missing storage-c
lass or type specifiers
c:\client\myHostInfo.h(112) : error C2061: syntax error : identifier 'string'
c:\client\myHostInfo.h(113) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(94) : error C2143: syntax error : missing ';' before '&'
c:\client\mySocket.h(94) : error C2433: 'ostream' : 'friend' not permitted on da
ta declarations
c:\client\mySocket.h(94) : error C2501: 'ostream' : missing storage-class or typ
e specifiers
c:\client\mySocket.h(94) : error C2061: syntax error : identifier 'ostream'
c:\client\mySocket.h(94) : error C2501: 'mySocket::operator`<<'' : missing stora
ge-class or type specifiers
c:\client\mySocket.h(94) : error C2805: binary 'operator <<' has too few paramet
ers
c:\client\mySocket.h(100) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(101) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(102) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(120) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(149) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(154) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(167) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(173) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(177) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(178) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(179) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(180) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(181) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(182) : error C2061: syntax error : identifier 'string'
myClient.cpp(33) : error C2661: 'myHostInfo::myHostInfo' : no overloaded functio
n takes 2 arguments
myClient.cpp(42) : error C2679: binary '<<' : no operator found which takes a ri
ght-hand operand of type 'myTcpSocket' (or there is no acceptable conversion)
myClient.cpp(44) : error C2679: binary '<<' : no operator found which takes a ri
ght-hand operand of type 'myTcpSocket' (or there is no acceptable conversion)
myClient.cpp(49) : error C2660: 'myTcpSocket::connectToServer' : function does n
ot take 2 arguments
myClient.cpp(61) : error C2660: 'myTcpSocket::sendMessage' : function does not t
ake 1 arguments
myClient.cpp(66) : error C2660: 'myTcpSocket::recieveMessage' : function does no
t take 1 arguments
Mike Clark
|
|
|
|
|
did you get the earlier message I sent? I reveived a web page error from this site just after it started transmitting.
Mike
|
|
|
|
|
Mike,
I received your message.
I did not quite get this CLI thing: I was using VC++6.0 when I was developing the code in this article. If you wanted to compile it using VC.net, I am sure it will give you tons of strange errors. Do you have VC++6.0 handy? Other people had use VC++6.0 to compile it without trouble. Let me know more about the environment you are using.
Sorry for not being able to provide any concrete help.
|
|
|
|
|
The CLI thing is Command Line Input version of the compiler (old school, sorry). I am specifficaly not using .Net.
All I really want to do is be able to compile and execute all the progrms first. Then I want to add some additional code on both client and server.
I have the MC VC ++ complier took ket 2003 and I have Visual Studio .Net.
Tha challen is the file structure that you get with the download.zip files is not usabel.
If you go to this site and download your files you would see wht I am trying to explain. They will not compile as is.
Regards
Mike
|
|
|
|
|
I am glad you are using VC6.0 too. Yes, I did download the zip from this site and I did unzip it and it creates two directories, one for the client and one for the server, and it compiled fine.
I also read this article again: all you need is clearly written in the article, I guess you just need a little patience? Also, other folks can do it without problem. try it again, build the two projects (one for the client, one for the server), follow the instructions here, it should work.
|
|
|
|
|
Thanks again.
Help me understand what you mean exatly by projects. I have not been using any project support from the compiler and have been trying to compile each program in a stand alone mode. Are you creating a "project" and then adding the source to the project. Since i did not see any porject files I assume this was the way to go.
I will re-read the doc.
Thank you for your patience.
Mike
|
|
|
|
|
oh, I finally understand what you meant. I think the thing you need to do is to use microsoft visual C++ 6.0, and it has an IDE (intergrated development environment), in this IDE, you can create a "project" and do the compile and debug etc.
The very top of this article has a link, "Download source - 40 Kb", click on this link to download the source code, it is a zip file and when you unzip it, it creates two directories, one is for the client, one is for the server.
Start the IDE from VC6.0, use the "new" menu to create a "project", for example, for the server first, name it whatever you want to, and add all the files from in the server directory into this project and start to compile, it should be compiling with no problems.
Create another "project" in the VC6.0 IDE for the client, and add all the files from the client directory into this project and compile. you should be fine.
|
|
|
|
|
I have jumped to the Visal Studion .Net 2005 Beta.
I built a project for the client, set the C++ option to no procompiled headers, win32 app, and did a build soluion. Received Error C1083 file not found for #include files. The downloaded directroy and folder structure does not match the #include statements in the code.
Do I creatre the folders and copy the code or change the #include statements in all the source?
#include "..\mySocket\mySocket.h"
#include "..\myLog\myLog.h"
#include "..\myException\myException.h"
#include "..\myHostInfo\myHostInfo.h"
Also received several warning messages.
Thanks
Mike
He is the output form the Build solution:
Compiling...
CS_Client.cpp
myClient.cpp
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\myclient.cpp(1) : fatal error C1083: Cannot open include file: '..\mySocket\mySocket.h': No such file or directory
myException.cpp
myHostInfo.cpp
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\myhostinfo.cpp(2) : fatal error C1083: Cannot open include file: '..\myLog\myLog.h': No such file or directory
myLog.cpp
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(100) : warning C4996: 'gmtime' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\time.inl(87) : see declaration of 'gmtime'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(114) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(115) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(118) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(140) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
mySocket.cpp
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mysocket.h(4) : fatal error C1083: Cannot open include file: '../myHostInfo/myHostInfo.h': No such file or directory
Generating Code...
|
|
|
|
|
Mike,
I did the following, as you can see:
#include "..\mySocket\mySocket.h"
#include "..\myLog\myLog.h"
#include "..\myException\myException.h"
#include "..\myHostInfo\myHostInfo.h"
so I kinda of hard-coded the path for each of the .h file - you can put the .h files anywhere you want, but you do have to change the path here to reflect the changes you have made. the easiest thing to do is to put all the .h files together with the .cpp files in the same directory, and then change the above code into the following:
#include "mySocket.h"
#include "myLog.h"
#include "myException.h"
#include "myHostInfo.h"
the compiler will then easily find all the .h files.
|
|
|
|
|
Hi Liyang,
I have been offline for a while due to hurricane Rita (i live in the NW Houston area).
I got by the compile #include issues only to run into a linker problem which i am sure is easy to resolve. I compiled this using VS VC++ beta2005 and VS VC++ 6.0 and saw the same error messages. I have included beta2005 output in this message.
Are there "additional library" that I need to include?
Build Log Rebuild started: Project: CS_Client, Configuration: Debug|Win32
Command Lines Creating temporary file "c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\RSP0000051986427192.rsp" with contents
[
/Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /GS- /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /c /Wp64 /ZI /TP /prefast ..\..\mySocket.cpp
..\..\myLog.cpp
..\..\myHostInfo.cpp
..\..\myException.cpp
..\..\myClient.cpp
.\CS_Client.cpp
]
Creating command line "cl.exe @c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\RSP0000051986427192.rsp /nologo /errorReport:prompt"
Creating temporary file "c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\RSP0000061986427192.rsp" with contents
[
/Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /GS- /Yc"stdafx.h" /Fp"Debug\CS_Client.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /c /Wp64 /ZI /TP /prefast .\stdafx.cpp
]
Creating command line "cl.exe @c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\RSP0000061986427192.rsp /nologo /errorReport:prompt"
Creating command line "rc.exe /d "_UNICODE" /d "UNICODE" /fo"Debug/CS_Client.res" .\CS_Client.rc"
Creating temporary file "c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\TMP0000071986427192.tmp" with contents
[
1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ ".\\Debug\\CS_Client.exe.embed.manifest"
]
Creating command line "rc.exe /fo".\Debug\CS_Client.exe.embed.manifest.res" c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\TMP0000071986427192.tmp"
Creating temporary file "c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\RSP0000081986427192.rsp" with contents
[
/OUT:"Debug\CS_Client.exe" /INCREMENTAL /MANIFEST /MANIFESTFILE:"Debug\CS_Client.exe.intermediate.manifest" /DEBUG /PDB:"c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\CS_Client.pdb" /SUBSYSTEM:WINDOWS /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
".\Debug\CS_Client.obj"
".\Debug\myClient.obj"
".\Debug\myException.obj"
".\Debug\myHostInfo.obj"
".\Debug\myLog.obj"
".\Debug\mySocket.obj"
".\Debug\stdafx.obj"
".\Debug\CS_Client.res"
".\Debug\CS_Client.exe.embed.manifest.res"
]
Creating command line "link.exe @c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\RSP0000081986427192.rsp /NOLOGO /ERRORREPORT:PROMPT"
Output Window Compiling...
cl : Command line warning D9035 : option 'prefast' has been deprecated and will be removed in a future release
cl : Command line warning D9036 : use 'analyze' instead of 'prefast'
stdafx.cpp
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(708) : warning C6054: string '_Source' may not be zero-terminated: Lines: 705, 708
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(717) : warning C6054: string '_Source' may not be zero-terminated: Lines: 714, 717
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(728) : warning C6054: string '_Source' may not be zero-terminated: Lines: 725, 728
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(728) : warning C6054: string '_Destination' may not be zero-terminated: Lines: 725, 728
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(737) : warning C6054: string '_Source' may not be zero-terminated: Lines: 734, 737
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(737) : warning C6054: string '_Destination' may not be zero-terminated: Lines: 734, 737
Compiling...
cl : Command line warning D9035 : option 'prefast' has been deprecated and will be removed in a future release
cl : Command line warning D9036 : use 'analyze' instead of 'prefast'
CS_Client.cpp
myClient.cpp
myException.cpp
myHostInfo.cpp
myLog.cpp
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(100) : warning C4996: 'gmtime' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\time.inl(87) : see declaration of 'gmtime'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(114) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(115) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(118) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(140) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
mySocket.cpp
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mysocket.cpp(14) : warning C4244: '=' : conversion from 'SOCKET' to 'int', possible loss of data
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mysocket.cpp(1080) : warning C4244: '=' : conversion from 'SOCKET' to 'int', possible loss of data
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mysocket.cpp(1191) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mysocket.cpp(1198) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
Processing...
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1353) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=char,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1359) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=wchar_t,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6237: ( && ) is always zero. is never evaluated and may have side effects
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'int std::basic_filebuf<_Elem,_Traits>::pbackfail(int)'
with
[
_Elem=char,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(549) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6239: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'unsigned short std::basic_filebuf<_Elem,_Traits>::pbackfail(unsigned short)'
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(551) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(471) : warning C6240: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(459) : while compiling class template member function 'void std::basic_filebuf<_Elem,_Traits>::_Init(_iobuf *,std::basic_filebuf<_Elem,_Traits>::_Initfl)'
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(107) : warning C6011: dereferencing NULL pointer '_Myptr': Lines: 93, 96, 97, 107
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(88) : while compiling class template member function 'const char &std::_String_const_iterator<_Elem,_Traits,_Alloc>::operator *(void) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(912) : see reference to class template instantiation 'std::_String_const_iterator<_Elem,_Traits,_Alloc>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(911) : while compiling class template member function 'std::basic_string<_Elem,_Traits,_Ax> &std::basic_string<_Elem,_Traits,_Ax>::append(const _Elem *)'
with
[
_Elem=char,
_Traits=std::char_traits,
_Ax=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(2057) : see reference to class template instantiation 'std::basic_string<_Elem,_Traits,_Ax>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits,
_Ax=std::allocator
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1353) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=char,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1359) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=wchar_t,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6237: ( && ) is always zero. is never evaluated and may have side effects
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'int std::basic_filebuf<_Elem,_Traits>::pbackfail(int)'
with
[
_Elem=char,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(549) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6239: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'unsigned short std::basic_filebuf<_Elem,_Traits>::pbackfail(unsigned short)'
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(551) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(471) : warning C6240: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(459) : while compiling class template member function 'void std::basic_filebuf<_Elem,_Traits>::_Init(_iobuf *,std::basic_filebuf<_Elem,_Traits>::_Initfl)'
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(107) : warning C6011: dereferencing NULL pointer '_Myptr': Lines: 93, 96, 97, 107
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(88) : while compiling class template member function 'const char &std::_String_const_iterator<_Elem,_Traits,_Alloc>::operator *(void) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(340) : see reference to class template instantiation 'std::_String_const_iterator<_Elem,_Traits,_Alloc>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(332) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,std::_Bool &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1353) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=char,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1359) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=wchar_t,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6237: ( && ) is always zero. is never evaluated and may have side effects
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'int std::basic_filebuf<_Elem,_Traits>::pbackfail(int)'
with
[
_Elem=char,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(549) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6239: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'unsigned short std::basic_filebuf<_Elem,_Traits>::pbackfail(unsigned short)'
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(551) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(471) : warning C6240: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(459) : while compiling class template member function 'void std::basic_filebuf<_Elem,_Traits>::_Init(_iobuf *,std::basic_filebuf<_Elem,_Traits>::_Initfl)'
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(107) : warning C6011: dereferencing NULL pointer '_Myptr': Lines: 93, 96, 97, 107
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(88) : while compiling class template member function 'const char &std::_String_const_iterator<_Elem,_Traits,_Alloc>::operator *(void) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(912) : see reference to class template instantiation 'std::_String_const_iterator<_Elem,_Traits,_Alloc>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(911) : while compiling class template member function 'std::basic_string<_Elem,_Traits,_Ax> &std::basic_string<_Elem,_Traits,_Ax>::append(const _Elem *)'
with
[
_Elem=char,
_Traits=std::char_traits,
_Ax=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(2057) : see reference to class template instantiation 'std::basic_string<_Elem,_Traits,_Ax>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits,
_Ax=std::allocator
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1353) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=char,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1359) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=wchar_t,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1353) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=char,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1359) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=wchar_t,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6237: ( && ) is always zero. is never evaluated and may have side effects
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'int std::basic_filebuf<_Elem,_Traits>::pbackfail(int)'
with
[
_Elem=char,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(549) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6239: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'unsigned short std::basic_filebuf<_Elem,_Traits>::pbackfail(unsigned short)'
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(551) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(471) : warning C6240: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(459) : while compiling class template member function 'void std::basic_filebuf<_Elem,_Traits>::_Init(_iobuf *,std::basic_filebuf<_Elem,_Traits>::_Initfl)'
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(107) : warning C6011: dereferencing NULL pointer '_Myptr': Lines: 93, 96, 97, 107
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(88) : while compiling class template member function 'const char &std::_String_const_iterator<_Elem,_Traits,_Alloc>::operator *(void) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(340) : see reference to class template instantiation 'std::_String_const_iterator<_Elem,_Traits,_Alloc>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(332) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,std::_Bool &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(708) : warning C6054: string '_Source' may not be zero-terminated: Lines: 705, 708
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(717) : warning C6054: string '_Source' may not be zero-terminated: Lines: 714, 717
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(728) : warning C6054: string '_Source' may not be zero-terminated: Lines: 725, 728
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(728) : warning C6054: string '_Destination' may not be zero-terminated: Lines: 725, 728
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(737) : warning C6054: string '_Source' may not be zero-terminated: Lines: 734, 737
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(737) : warning C6054: string '_Destination' may not be zero-terminated: Lines: 734, 737
Generating Code...
Compiling resources...
Compiling manifest to resources...
Linking...
myClient.obj : error LNK2019: unresolved external symbol __imp__inet_ntoa@4 referenced in function "public: char * __thiscall myHostInfo::getHostIPAddress(void)" (?getHostIPAddress@myHostInfo@@QAEPADXZ)
mySocket.obj : error LNK2001: unresolved external symbol __imp__inet_ntoa@4
myHostInfo.obj : error LNK2019: unresolved external symbol __imp__gethostbyname@4 referenced in function "public: __thiscall myHostInfo::myHostInfo(void)" (??0myHostInfo@@QAE@XZ)
myHostInfo.obj : error LNK2019: unresolved external symbol __imp__gethostname@8 referenced in function "public: __thiscall myHostInfo::myHostInfo(void)" (??0myHostInfo@@QAE@XZ)
myHostInfo.obj : error LNK2019: unresolved external symbol __imp__gethostbyaddr@12 referenced in function "public: __thiscall myHostInfo::myHostInfo(class std::basic_string,class std::allocator > &,enum hostType)" (??0myHostInfo@@QAE@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4hostType@@@Z)
myHostInfo.obj : error LNK2019: unresolved external symbol __imp__inet_addr@4 referenced in function "public: __thiscall myHostInfo::myHostInfo(class std::basic_string,class std::allocator > &,enum hostType)" (??0myHostInfo@@QAE@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4hostType@@@Z)
mySocket.obj : error LNK2001: unresolved external symbol __imp__inet_addr@4
myHostInfo.obj : error LNK2019: unresolved external symbol __imp__WSAGetLastError@0 referenced in function "private: void __thiscall myHostInfo::detectErrorGethostbyname(int *,class std::basic_string,class std::allocator > &)" (?detectErrorGethostbyname@myHostInfo@@AAEXPAHAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
mySocket.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0
mySocket.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function __catch$??0mySocket@@QAE@H@Z$0
mySocket.obj : error LNK2019: unresolved external symbol __imp__htonl@4 referenced in function __catch$??0mySocket@@QAE@H@Z$0
mySocket.obj : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function "public: __thiscall mySocket::mySocket(int)" (??0mySocket@@QAE@H@Z)
mySocket.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "public: virtual __thiscall mySocket::~mySocket(void)" (??1mySocket@@UAE@XZ)
mySocket.obj : error LNK2019: unresolved external symbol __imp__setsockopt@20 referenced in function "public: void __thiscall mySocket::setDebug(int)" (?setDebug@mySocket@@QAEXH@Z)
mySocket.obj : error LNK2019: unresolved external symbol __imp__ioctlsocket@12 referenced in function "public: void __thiscall mySocket::setSocketBlocking(int)" (?setSocketBlocking@mySocket@@QAEXH@Z)
mySocket.obj : error LNK2019: unresolved external symbol __imp__getsockopt@20 referenced in function "public: int __thiscall mySocket::getDebug(void)" (?getDebug@mySocket@@QAEHXZ)
mySocket.obj : error LNK2019: unresolved external symbol __imp__WSACleanup@0 referenced in function "public: virtual __thiscall myTcpSocket::~myTcpSocket(void)" (??1myTcpSocket@@UAE@XZ)
mySocket.obj : error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function "public: static void __cdecl myTcpSocket::initialize(void)" (?initialize@myTcpSocket@@SAXXZ)
mySocket.obj : error LNK2019: unresolved external symbol __imp__bind@12 referenced in function "public: void __thiscall myTcpSocket::bindSocket(void)" (?bindSocket@myTcpSocket@@QAEXXZ)
mySocket.obj : error LNK2019: unresolved external symbol __imp__connect@12 referenced in function "public: virtual void __thiscall myTcpSocket::connectToServer(class std::basic_string,class std::allocator > &,enum hostType)" (?connectToServer@myTcpSocket@@UAEXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4hostType@@@Z)
mySocket.obj : error LNK2019: unresolved external symbol __imp__accept@12 referenced in function "public: class myTcpSocket * __thiscall myTcpSocket::acceptClient(class std::basic_string,class std::allocator > &)" (?acceptClient@myTcpSocket@@QAEPAV1@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
mySocket.obj : error LNK2019: unresolved external symbol __imp__listen@8 referenced in function "public: void __thiscall myTcpSocket::listenToClient(int)" (?listenToClient@myTcpSocket@@QAEXH@Z)
mySocket.obj : error LNK2019: unresolved external symbol __imp__send@16 referenced in function "public: int __thiscall myTcpSocket::sendMessage(class std::basic_string,class std::allocator > &)" (?sendMessage@myTcpSocket@@QAEHAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
mySocket.obj : error LNK2019: unresolved external symbol __imp__recv@16 referenced in function "private: int __thiscall myTcpSocket::XPrecieveMessage(class std::basic_string,class std::allocator > &)" (?XPrecieveMessage@myTcpSocket@@AAEHAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
Debug\CS_Client.exe : fatal error LNK1120: 21 unresolved externals
Results Build log was saved at "file://c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\BuildLog.htm"
CS_Client - 25 error(s), 61 warning(s)
|
|
|
|
|
Mike,
Hope you are doing well now! man, a tough year for everyone.
Anyway, if you can, please use Visual C++ 6.0, that is the one I used when doing this project.
for your problem, first make sure the following (I am assuming you are using visual studio 6.0) and I am assuming you built a project for your client (and certainly for your server too): at the menu bar, find the menu item "project", click it, goto "properties", in the popup box, on the leftside select the Linker folder then select Input. on the right side, select the top textbox "additional dependencies" and type in "ws2_32.lib".
If you still have the link problem, for example, the it complains that a function foo() cannot be found, then first you need to know which file (.cpp file) contains foo()? for example, foo.cpp contains foo(), then, you need to make sure foo.cpp IS included in your project.
HTH,
liyang
|
|
|
|
|
Just one more pooint of clarification.
I am using the free MS VC++ compiler that does not have any of the .Net type support. It is command line only.
I did create a Bloodshed compile environment and created a project and was able to get further utill I received the error below. The "clientInfo" did not resolve in MySocket.cpp.
BTW thius is a different download and has all the files including winserver.cpp in the same folder.
// Get the host name given the address
char *sAddress = inet_ntoa((struct in_addr)clientAddress.sin_addr);
myHostInfo clientInfo(string(sAddress),ADDRESS);
char* hostName = clientInfo.getHostName();
clientHost += string(hostName);
1076 C:\Compile\CSProject\mySocket.cpp no matching function for call to `myHostInfo::myHostInfo(std::string, hostType)'
Thanks again. I agree this should not be this hard.
|
|
|
|
|
no matter the socket is in blocking/non-blocking mode, partial receive happens,
for example when you do recv for the header which is 6 bytes, you might get 2 bytes and need other read to get it all. the code does not handle it.
|
|
|
|
|
I remembered I did this check and handled it in the code, but let me check again.
thanks!
|
|
|
|
|
hello there,
great code! i just have some problems compiling it with vc++ 6.0. i'm getting the following errors with the client side:
myclient.cpp(99) : fatal error C1010: unexpected end of file while looking for precompiled header directive
myexception.cpp(26) : fatal error C1010: unexpected end of file while looking for precompiled header directive
myhostinfo.cpp(180) : fatal error C1010: unexpected end of file while looking for precompiled header directive
mylog.cpp(143) : fatal error C1010: unexpected end of file while looking for precompiled header directive
mysocket.cpp(1414) : fatal error C1010: unexpected end of file while looking for precompiled header directive
Generating Code...
Error executing cl.exe.
Client.exe - 5 error(s), 0 warning(s)
and similar errors for the server side.
any suggestions??
cheers.
|
|
|
|
|
seems like the .h files have problems: check to see you include all the .h files correct, and there is no extra ";" at the end of the .h files, no extra ";" thing at un-necessary places.
HTH,
liyang
|
|
|
|
|
Yeah , when i compiled this code i confronted such this kind of errrors. i just corrected the #include "..\mySocket\mySocket.h" to #include "mySocket.h" then compiled successfully.
|
|
|
|
|
Does this code work if compiled in MSA?
|
|
|
|
|
check your personal email.
|
|
|
|
|
there is a long list of errors as shown below. how do i solve it
--------------------Configuration: myserver - Win32 Debug--------------------
Compiling...
winSeverForMultipleClient.cpp
d:\program files\microsoft sdk\include\winsock2.h(109) : error C2011: 'fd_set' : 'struct' type redefinition
d:\program files\microsoft sdk\include\winsock2.h(144) : warning C4005: 'FD_SET' : macro redefinition
d:\program files\microsoft sdk\include\winsock.h(88) : see previous definition of 'FD_SET'
d:\program files\microsoft sdk\include\winsock2.h(153) : error C2011: 'timeval' : 'struct' type redefinition
d:\program files\microsoft sdk\include\winsock2.h(209) : error C2011: 'hostent' : 'struct' type redefinition
d:\program files\microsoft sdk\include\winsock2.h(222) : error C2011: 'netent' : 'struct' type redefinition
d:\program files\microsoft sdk\include\winsock2.h(229) : error C2011: 'servent' : 'struct' type redefinition
d:\program files\microsoft sdk\include\winsock2.h(241) : error C2011: 'protoent' : 'struct' type redefinition
d:\program files\microsoft sdk\include\winsock2.h(397) : error C2011: 'sockaddr_in' : 'struct' type redefinition
d:\program files\microsoft sdk\include\winsock2.h(407) : error C2011: 'WSAData' : 'struct' type redefinition
d:\program files\microsoft sdk\include\winsock2.h(467) : warning C4005: 'SO_DONTLINGER' : macro redefinition
d:\program files\microsoft sdk\include\winsock.h(411) : see previous definition of 'SO_DONTLINGER'
d:\program files\microsoft sdk\include\winsock2.h(524) : warning C4005: 'AF_IPX' : macro redefinition
d:\program files\microsoft sdk\include\winsock.h(469) : see previous definition of 'AF_IPX'
d:\program files\microsoft sdk\include\winsock2.h(552) : warning C4005: 'AF_MAX' : macro redefinition
d:\program files\microsoft sdk\include\winsock.h(488) : see previous definition of 'AF_MAX'
d:\program files\microsoft sdk\include\winsock2.h(558) : error C2011: 'sockaddr' : 'struct' type redefinition
d:\program files\microsoft sdk\include\winsock2.h(598) : error C2011: 'sockproto' : 'struct' type redefinition
d:\program files\microsoft sdk\include\winsock2.h(637) : error C2011: 'linger' : 'struct' type redefinition
d:\program files\microsoft sdk\include\winsock2.h(650) : warning C4005: 'SOMAXCONN' : macro redefinition
d:\program files\microsoft sdk\include\winsock.h(553) : see previous definition of 'SOMAXCONN'
d:\program files\microsoft sdk\include\winsock2.h(675) : warning C4005: 'FD_READ' : macro redefinition
d:\program files\microsoft sdk\include\winsock.h(571) : see previous definition of 'FD_READ'
d:\program files\microsoft sdk\include\winsock2.h(678) : warning C4005: 'FD_WRITE' : macro redefinition
d:\program files\microsoft sdk\include\winsock.h(572) : see previous definition of 'FD_WRITE'
d:\program files\microsoft sdk\include\winsock2.h(681) : warning C4005: 'FD_OOB' : macro redefinition
d:\program files\microsoft sdk\include\winsock.h(573) : see previous definition of 'FD_OOB'
d:\program files\microsoft sdk\include\winsock2.h(684) : warning C4005: 'FD_ACCEPT' : macro redefinition
d:\program files\microsoft sdk\include\winsock.h(574) : see previous definition of 'FD_ACCEPT'
d:\program files\microsoft sdk\include\winsock2.h(687) : warning C4005: 'FD_CONNECT' : macro redefinition
d:\program files\microsoft sdk\include\winsock.h(575) : see previous definition of 'FD_CONNECT'
d:\program files\microsoft sdk\include\winsock2.h(690) : warning C4005: 'FD_CLOSE' : macro redefinition
d:\program files\microsoft sdk\include\winsock.h(576) : see previous definition of 'FD_CLOSE'
d:\program files\microsoft sdk\include\winsock2.h(1622) : error C2375: 'accept' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(744) : see declaration of 'accept'
d:\program files\microsoft sdk\include\winsock2.h(1643) : error C2375: 'bind' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(749) : see declaration of 'bind'
d:\program files\microsoft sdk\include\winsock2.h(1662) : error C2375: 'closesocket' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(754) : see declaration of 'closesocket'
d:\program files\microsoft sdk\include\winsock2.h(1681) : error C2375: 'connect' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(756) : see declaration of 'connect'
d:\program files\microsoft sdk\include\winsock2.h(1702) : error C2375: 'ioctlsocket' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(761) : see declaration of 'ioctlsocket'
d:\program files\microsoft sdk\include\winsock2.h(1723) : error C2375: 'getpeername' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(766) : see declaration of 'getpeername'
d:\program files\microsoft sdk\include\winsock2.h(1744) : error C2375: 'getsockname' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(771) : see declaration of 'getsockname'
d:\program files\microsoft sdk\include\winsock2.h(1767) : error C2375: 'getsockopt' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(776) : see declaration of 'getsockopt'
d:\program files\microsoft sdk\include\winsock2.h(1788) : error C2375: 'htonl' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(783) : see declaration of 'htonl'
d:\program files\microsoft sdk\include\winsock2.h(1805) : error C2375: 'htons' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(785) : see declaration of 'htons'
d:\program files\microsoft sdk\include\winsock2.h(1822) : error C2375: 'inet_addr' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(787) : see declaration of 'inet_addr'
d:\program files\microsoft sdk\include\winsock2.h(1839) : error C2375: 'inet_ntoa' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(789) : see declaration of 'inet_ntoa'
d:\program files\microsoft sdk\include\winsock2.h(1857) : error C2375: 'listen' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(791) : see declaration of 'listen'
d:\program files\microsoft sdk\include\winsock2.h(1875) : error C2375: 'ntohl' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(795) : see declaration of 'ntohl'
d:\program files\microsoft sdk\include\winsock2.h(1892) : error C2375: 'ntohs' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(797) : see declaration of 'ntohs'
d:\program files\microsoft sdk\include\winsock2.h(1912) : error C2375: 'recv' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(799) : see declaration of 'recv'
d:\program files\microsoft sdk\include\winsock2.h(1937) : error C2375: 'recvfrom' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(805) : see declaration of 'recvfrom'
d:\program files\microsoft sdk\include\winsock2.h(1963) : error C2375: 'select' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(813) : see declaration of 'select'
d:\program files\microsoft sdk\include\winsock2.h(1987) : error C2375: 'send' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(820) : see declaration of 'send'
d:\program files\microsoft sdk\include\winsock2.h(2012) : error C2375: 'sendto' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(826) : see declaration of 'sendto'
d:\program files\microsoft sdk\include\winsock2.h(2038) : error C2375: 'setsockopt' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(834) : see declaration of 'setsockopt'
d:\program files\microsoft sdk\include\winsock2.h(2060) : error C2375: 'shutdown' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(841) : see declaration of 'shutdown'
d:\program files\microsoft sdk\include\winsock2.h(2080) : error C2375: 'socket' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(845) : see declaration of 'socket'
d:\program files\microsoft sdk\include\winsock2.h(2103) : error C2375: 'gethostbyaddr' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(852) : see declaration of 'gethostbyaddr'
d:\program files\microsoft sdk\include\winsock2.h(2122) : error C2375: 'gethostbyname' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(857) : see declaration of 'gethostbyname'
d:\program files\microsoft sdk\include\winsock2.h(2140) : error C2375: 'gethostname' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(859) : see declaration of 'gethostname'
d:\program files\microsoft sdk\include\winsock2.h(2159) : error C2375: 'getservbyport' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(863) : see declaration of 'getservbyport'
d:\program files\microsoft sdk\include\winsock2.h(2178) : error C2375: 'getservbyname' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(867) : see declaration of 'getservbyname'
d:\program files\microsoft sdk\include\winsock2.h(2196) : error C2375: 'getprotobynumber' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(871) : see declaration of 'getprotobynumber'
d:\program files\microsoft sdk\include\winsock2.h(2213) : error C2375: 'getprotobyname' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(873) : see declaration of 'getprotobyname'
d:\program files\microsoft sdk\include\winsock2.h(2233) : error C2375: 'WSAStartup' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(877) : see declaration of 'WSAStartup'
d:\program files\microsoft sdk\include\winsock2.h(2251) : error C2375: 'WSACleanup' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(881) : see declaration of 'WSACleanup'
d:\program files\microsoft sdk\include\winsock2.h(2268) : error C2375: 'WSASetLastError' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(883) : see declaration of 'WSASetLastError'
d:\program files\microsoft sdk\include\winsock2.h(2285) : error C2375: 'WSAGetLastError' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(885) : see declaration of 'WSAGetLastError'
d:\program files\microsoft sdk\include\winsock2.h(2302) : error C2375: 'WSAIsBlocking' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(887) : see declaration of 'WSAIsBlocking'
d:\program files\microsoft sdk\include\winsock2.h(2319) : error C2375: 'WSAUnhookBlockingHook' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(889) : see declaration of 'WSAUnhookBlockingHook'
d:\program files\microsoft sdk\include\winsock2.h(2336) : error C2375: 'WSASetBlockingHook' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(891) : see declaration of 'WSASetBlockingHook'
d:\program files\microsoft sdk\include\winsock2.h(2353) : error C2375: 'WSACancelBlockingCall' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(893) : see declaration of 'WSACancelBlockingCall'
d:\program files\microsoft sdk\include\winsock2.h(2375) : error C2375: 'WSAAsyncGetServByName' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(895) : see declaration of 'WSAAsyncGetServByName'
d:\program files\microsoft sdk\include\winsock2.h(2402) : error C2375: 'WSAAsyncGetServByPort' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(903) : see declaration of 'WSAAsyncGetServByPort'
d:\program files\microsoft sdk\include\winsock2.h(2428) : error C2375: 'WSAAsyncGetProtoByName' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(911) : see declaration of 'WSAAsyncGetProtoByName'
d:\program files\microsoft sdk\include\winsock2.h(2453) : error C2375: 'WSAAsyncGetProtoByNumber' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(918) : see declaration of 'WSAAsyncGetProtoByNumber'
d:\program files\microsoft sdk\include\winsock2.h(2478) : error C2375: 'WSAAsyncGetHostByName' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(925) : see declaration of 'WSAAsyncGetHostByName'
d:\program files\microsoft sdk\include\winsock2.h(2505) : error C2375: 'WSAAsyncGetHostByAddr' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(932) : see declaration of 'WSAAsyncGetHostByAddr'
d:\program files\microsoft sdk\include\winsock2.h(2528) : error C2375: 'WSACancelAsyncRequest' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(941) : see declaration of 'WSACancelAsyncRequest'
d:\program files\microsoft sdk\include\winsock2.h(2548) : error C2375: 'WSAAsyncSelect' : redefinition; different linkage
d:\program files\microsoft sdk\include\winsock.h(943) : see declaration of 'WSAAsyncSelect'
Error executing cl.exe.
myserver.exe - 57 error(s), 11 warning(s)
|
|
|
|
|