Hi,
I am using MSVC to compile a C++ application and getting these
warnings:
warning C4511: 'serialCom' : copy constructor could not be generated
warning C4512: 'serialCom' : assignment operator could not be generated
The .h file is below. The warnings occur when I add the line std:fstream logfile;
I have read the msdn website and I know how to turn off the warnings form being displayed but I want to know how to eliminate it. Any help would be greatly appreciated. Thanks
Amish
Code:/* * serialCom.h * This header file contains all the functions required to use the serialCom class * * Author: Amish Rughoonundon * Date: 19 Dec 2005 * Version 1.0: Initial * */ #pragma once #include <windows.h> /*This header contains function used only in windows*/ #include <string> #include <iostream> /* iostream is used for input and output */ #include <fstream>/* fstream is used for file accessing*/ class serialCom { public: /* Variables */ /* Functions */ /* * serialCom() * * This is the constructor for the class serialCom. * * Param: None * */ serialCom(void); /* The destructor for makeSimFile Class */ ~serialCom(void); private: /* Variables */ std::ofstream logfile; /* Functions */ /* * * This function sets up the serial serial port communication. * Baud rate: B115200 * Data size 8bit, non-parity, 1 stop bit with Hardware flow control. * * PARAM: portname:- The name of the serial port * fd:- The handle of the serial port * * Return: Return an error code which is a negative number * depending on what went wrong in the function. * Refer to Errors.info for more information * If no errors 0 is returned. * */ int setupConnection(char* portname, HANDLE *fd); };



LinkBack URL
About LinkBacks
fstream logfile;


