• Home
  • .Net
  • Database
  • Programmer
  • Microsoft
  • Software
  • Network
  • Excel
  • C & C++
  • Visual Basic
  • Windows

Tags: Programming, C, C++

C & C++

  • Error C2440 on porting from VC6 to VC++.NET
  • Hi,I am porting a MFC Dialog-based app from VC6 to VC++.NET. I have got the following error. I have user-defined message handler in the CMyTestApp, instead of CMyTestDlg, in the VC6 project. Does thiis error message tell me that I can not have my message handler in the CMyTestApp and the message...
  • error C2440: = : cannot convert from std::string to char
  • I am going to form arrays through string. How to convert from std:string to char.#include<iostream>#include<string>#include<fstream>#include<sstream> using namespace std;int main(){char *str1[5], *str2[5], *test_string[5];int *input, i;ifstream in("testdfa.txt"); //open in...
  • error C2440: = : cannot convert from System::String __gc to char [10]
  • Hi all, I get the error in the title when trying to compile my Visual c++ project(Using VS2003)this is the body:#pragma oncetypedef struct{ char Title[100]; char Lyrics[100];}DefLyrics;DefLyrics LyricsDB;[...]private: System::Void btnAddLyricsToDB_Click(System::Object * sender, System::EventArgs *...
  • error C2440: 'return' : cannot convert from 'const char ' to
  • Abhijit Bhadra wrote:> Hi ,> I was trying to build my project in VC with latest Service Packs but> got this error .>unsigned short is a goofup on Microsoft's part because wchar_t isn'ta distinct type there. When you seem char vs. unsigned short issues,you've screwed up...
  • error C2440: 'return' : cannot convert from 'const char ' to 'const unsigned sho
  • "Abhijit Bhadra" <abhijit.bhadra.programming help.ca.com> wrote in message> Hi ,> I was trying to build my project in VC with latest Service Packs but> got this error .> C:\Program Files\Microsoft Visual> Studio\VC98\ATL\INCLUDE\atlconv.h(125) : error C2440: 'return' :> cannot c...
  • error C2440: 'return' : cannot convert from 'const char ' to 'const unsigned short
  • Hi ,I was trying to build my project in VC with latest Service Packs butgot this error .C:\Program Files\Microsoft VisualStudio\VC98\ATL\INCLUDE\atlconv.h(125) : error C2440: 'return' :cannot convert from 'const char *' to 'const unsigned short *'Types pointed to ar...
  • error C2440: return : cannot convert from const char to const unsigned short Types poi
  • Hi ,I was trying to build my project in VC with latest Service Packs butgot this error .C:\Program Files\Microsoft VisualStudio\VC98\ATL\INCLUDE\atlconv.h(125) : error C2440: 'return' :cannot convert from 'const char *' to 'const unsigned short *'Types pointed to ar...
  • error C2447: missing function header (old-style formal list?)
  • I'm getting the following error using Visual C++:error C2447: missing function header (old-style formal list?)How can I fix it?Thanks!!!!!!!...
  • error C2447: missing function header (old-style formal list?)
  • Anyone have any insight on this error?Thanks, Susan...
  • error C2466: cannot allocate an array of constant size 0
  • of course i'm not trying to allocate a 0sized array!!! here's my code: int main() { int N, M; ifstream fin("text.in"); fin >> N >> M; int from[N]; int to[N]; int dist[N]; //the rest omitted i know that iso c++ forbids variable-length arrays on stack, but i think i do...
  • Error C2504?
  • Im making {or trying to make} a car simulator in C++It is a console application, but i keep getting this errorC2504. Undefined base class.#include "Odometer.h"//this is the base class class Car{public: // class constructor to initilize objects as they are created // and to ensure that data...
  • Error C2512 using System::String^
  • When declaring a new managed string "pinned pointer"...System::String^ myString = gcnew System::String; I get the following error.Error C2512: 'System::String::String' : no appropriate default constructor available. This is after creating a new form in my project and a new functions. Attem...
  • Error C2555 with pointer to class with no template instantiation?
  • Error C2555c:\C++ projects\stat1\stdmatrix_adapt.h(41) : error C2555:'std_tools::Matrix_adapter<T>::at': overriding virtual function returntype differs and is not covariant from 'ple::imtx_impl<T>::at'//in my program: the derived classtemplate <class T>class Matrix_adapter...
  • Error C2555 with pointer to class with no template instantiation?
  • Error C2555c:\C++ projects\stat1\stdmatrix_adapt.h(41) : error C2555:'std_tools::Matrix_adapter<T>::at': overriding virtual function returntype differs and is not covariant from 'ple::imtx_impl<T>::at'//in my program: the derived classtemplate <class T>class...
  • Error C2601 look at my code plz
  • #include <iostream.h>#include <conio.h>#include <string.h>#include <fstream.h>class student{private: char name[20]; int age; char sex[10]; int id;public: void input(); void print(); void storedata(); void searchdata();};class programme{private: char name[20]; int id; cha...
  • error C2614: 'CYYYRegister' : illegal member initialization:
  • HelloI am trying to understand an issue which I know how to fix but don'tknow why it works.Getting this error:error C2614: 'CYYYRegister' : illegal member initialization:'CRequest' is not a base or memberCode is below. If I change class CXXXRequest slightly as below:clas...
  • Error C2660
  • Hi, When i'm using this code in my file, if(!(OpenPort(portname))) MessageBox("Cannot open Communication Port.Please\nquit the application & re-start your PC.","Error",MB_OK+MB_ICONERROR);Following error has occured:Messagebox function doesnot take 3 parameters.Is there any need to include he...
  • Error C2660 Function does not take 1 argument
  • This seems like a cool site, I wish I could have found this sooner.Can someone pls help me with this line of code? I get an error C2660 telling me the function does not take an argument ( The portion in Bold face is the line I get the error in).Thnxsclass Party{private:string str1;string str2;pu...
  • error C2660, function does not take 3 arguments
  • Hello!I am passing parameters from VC++ .NET to and from C#.NET.I am getting an error on the VC++.NET side, which says c:\Documents and Settings\karthik\Desktop\Research\ManufAgTestProjekt\ASAP_MAS_Extension\MAS_Extension.cxx(483): error C2660: 'InterfaceProtocol::InterfaceProtocol::GetNextJob&...
  • error C2662 cannot convert this pointer..
  • i am getting this error error C2662: 'std::vector<_Ty>::push_back' : cannot convert 'this' pointer from 'const std::vector<_Ty>' to 'std::vector<_Ty> &' with [ _Ty=std::string ] and [ _Ty=std::string ] and [ _Ty=std::string ]this is my code inside the class...
  • Error C2664
  • I've got this errorcannot convert parameter 2 from 'System::Object __gc* __gc[]' to 'System::Object __gc*(__gc*)__gc[]'Does any one know how I would declare a System::Object __gc*(__gc*)__gc[]Or just another way to solve this problem.Thankyou...
  • Error C2664 - HELP
  • Don't understand how to correct this error?ERROR:C:\Naqx\MyConnMngr.cpp(204) : error C2664: 'void __cdecl CString::Format(const unsigned short *,...)' : cannot convert parameter 1 from 'char [9]' to 'const unsigned short *' Types pointed to are unrelated...
  • error C2664 & Struct problem
  • I have the following problem and I think it has something to do with structs and classes, but I am not sure.I have read several other post on this forum that describe the "error 2664" but could not find my solution in there. I also get the error when I forward declare the functions and do not work w...
  • error C2664 with InterlockedExchangePointer
  • I'm moving from VC6 to VC2003 and from multi-byte to Unicode.After fixing all the errors related to unicode, i ended with an error ican not resolve.************error C2664: 'InterlockedExchangePointer' : cannot convert parameter 1from 'T ** ' to 'void ** 'with[...
  • error C2664 with InterlockedExchangePointer
  • I'm moving from VC6 to VC2003 and from multi-byte to Unicode.After fixing all the errors related to unicode, i ended with an error ican not resolve.************error C2664: 'InterlockedExchangePointer' : cannot convert parameter 1from 'T ** ' to 'void ** 'with[...
  • Error C2664, C2228
  • I'm trying to learn how to set ranges by using classes and I get Error c2664 and C2228 when I build. I saw the question in my practice texrbook and I cant figure out what I'm missing. It says "ui" should have a class on the left of "ui' but it already does.Its declared right after the Range....
  • error C2664: 'parseInput' : cannot convert parameter 2 WHY?
  • I have no idea why am I getting an error C2664: 'parseInput' : cannot convert parameter 2 from 'main::WORD_STRUCT [200]' to 'struct WORD_STRUCT []'Code: ( text )#include <stdio.h>#include <stdlib.h>#include <string.h> #define FILENAME 80#define MAX_SIZE 1000#define CHAR_S...
  • error C2664: 'strcpy' : cannot convert parameter 2 from 'char'
  • kaizen wrote:> { strcpy(rec,message[j]);second parameter is a character, and should be a C-string (const char*)perhaps you wanted to do like:char tmp[2];tmp[0]=message[j]; tmp[1]='\0';strcat(receiver, tmp);but in general your coding style isnt too nice IMHO, also this looksmore...
  • error C2664: strcpy : cannot convert parameter 2 from char to const char
  • Hi,i wrote the code in C and compiled in VC++ compiler. at that time ithas thrown the below mentioned error.error C2664: 'strcpy' : cannot convert parameter 2 from 'char' to'const char *'Conversion from integral type to pointer type requiresreinterpret_cast, C-style...
  • error C2664: 'strcpy' : cannot convert parameter 2 from 'char' to 'const char '
  • Hi,i wrote the code in C and compiled in VC++ compiler. at that time ithas thrown the below mentioned error.error C2664: 'strcpy' : cannot convert parameter 2 from 'char' to'const char *'Conversion from integral type to pointer type requiresreinterpret_cast, C-style...