-
- Ambiguity of "<" and ">" symbols in C++
by mgio
- 9 Replies
- Last post
by n0n4m3
- The "<" and ">" symbols are used as both comparison operators and template parameter brackets in C++ and thus are ambiguous. The following code fragment will not compile under Microsoft Visual Studio C++ 2005 (and 2008 beta):
template < class T> struct ShowListLength<T, typename EnableIf<(TypelistLength<T>::value < LONG_LIST)>::type>
-
- benefits of private or protected constructor
by George2
- 10 Replies
- Last post
by George2
- Hello everyone,
I am thinking about the benefits of a private or protected constructor. The only benefits I could think of is we could use singleton design pattern and make a public function (e.g. CreateInstance) as a single point to create instances and hide the constructor to outside.
Any more comments
thanks in advance, George
-
- error C2228, need help!!
by Pranav Bahl
- 2 Replies
- Last post
by Pranav Bahl
- I WAS TRYING TO COMPILE THIS CODE BUT I ALWAYS GET THE FOLLOWING C2228 ERROR:
: error C2228: left of '.displayMessage' must have class/struct/union
: error C2228: left of '.setBalance' must have class/struct/union
: error C2228: left of '.getBalance' must have class/struct/union
Could someone please help me with this. Thank You
Code Block
#include <iostream>
-
- install sp1,then IDE error
by losepig
- 4 Replies
- Last post
by k j
- hello ,everybody,when i installed sp1 later, i rebuild my project ,and the following error appear:
--------------------------------------------------------
runtime error!
program:..\common7\IDE\devenv.exe
this apllication has requested the runtime to terminate it in an unusual way.please contact the application's support team for more informion.
-------------------------------------
-
- DLL Import
by CrackerJack
- 12 Replies
- Last post
by CrackerJack
- Hello there! I have a program and a DLL that I'm writing; they are both separate projects in the same solution. I added the DLL project as a reference to the program project, but whenever I run the program I get an error saying it cannot find/load the DLL. I can fix it by manually copying the DLL file into the output directory of the program. Is there a better way to do this, i.e. having Visual St
-
- ambiguous symbol
by AlexBB
- 11 Replies
- Last post
by Brad Ward
- Trying to compile a C++ WinForms Winsock related project with /clr option I get a few errors after adding #include <winsock2.h> statement. The reference is to a different header file: servprov.h . There is no direct reference in any of my files to this header. I verified it with quick find command. There is no reference to it in winsock2.h either. I do not know where the reference is coming
-
- Buffer help
by dellthinker
- 5 Replies
- Last post
by Simple Samples
- Hi all. I made a simple function that acts off of whether there's a certain string placed in a buffer.
Code Snippet
string match1; string match2="virtualspace"; if(client.find("matchup") != string::npos){ if(client.find(word) != string::npos){ if(match1 == match2){ cout << "Found a match"; } else{
-
- how to trim integer!
by Memoona
- 14 Replies
- Last post
by Simple Samples
- hello all!!! i have a problem regarding int.i have a number like year suppose 2007 in an int variable and now i want only the last two digits of this integer...i mean i have yera in four digits but i want it to be in two digits...fot dat matter i have to trim the first two digits.....can nyone help me out... regards
-
- Understanding Command Line Builds
by Jeremy Whitlock
- 0 Replies
- Last post
by Jeremy Whitlock
- Hi All, I have run into a situation where VC++ can successfully build a runnable application using the IDE but when I use the same make file and the same approach to building the application from the command line, using nmake, the msvcr80.dll is missing. I've googled and searched this forum to find answers on how to remedy it and I am confident that I can my my application work a number of way.
-
- VS2005 C++ debuggin
by patti_nyl
- 8 Replies
- Last post
by patti_nyl
- HI, I am having a problem.
When I am debuggin my application and dll's VS2005 Is crasching on the same line.
The message is "Microsoft Visual Studio has encountereed an internal error." I have no Idea what the problem is, how do I found out what is wrong in my code or somewhere else I have to close down VS2005 the hardway with <Ctrl>+<Alt>+<Del> to get it work
-
- window procedure of Button control?
by mathewzhao
- 6 Replies
- Last post
by Bite Qiu - MSFT
- Some books says "Button" control is also a window ,and it has own window procedure which exists in operation system's DLL files. Q1: When I click a button at an application window,how does Button control's window procedure interact with the application window's window procedure (Precondition:the Button control in the application window )
Q2:Which tools can seize the interactive p
-
- Can you share global variables between a DLL and a calling program?
by georgeob
- 14 Replies
- Last post
by georgeob
- Can you share global variables between a DLL and a calling program If so I would appreciate any tips. I tried putting the global variables in the DLL but it crashed when the VB porgram tried to call it.
-
- Access: Connectivity Issue: Data source name not found and no default driver specified
by Prabin_
- 3 Replies
- Last post
by Sahir Shah
- Hi all,
I have a working product deployed over large number of clients. But in one of the client's machine, the application fails due to connectivity problems with access database. The error logged by the application is as follows.
"[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
Connection string is "Driver={Microsof
-
- closing a window
by marlanew69
- 1 Replies
- Last post
by Pintu Shukla
- Hi I have a problem I wanted to see if you could help me with.
Everytime I close out of a window it well totally through me off. And I have to relog back on. It tells me that explorer is a having problems and must shut down. So if I want to stay on I just have to minamize my window, Then I have so many open that it run real slow. Can you help me
Thanks
MarlaNew
-
- Profiler for umanaged and managed c++ ?
by Torbjorn
- 4 Replies
- Last post
by Torbjorn
- Hi,
We have a solution with a couple of C# projects and some Managed C++ projects. The C++ projects also contains quite a bit unmanaged C++. Finally, we use some third party libraries.
Are there any good profiler tools to be used in our setting I want to be able to profile all parts of our solution.
Thanks!
Torbjorn
-
- primary numbers finding
by teasy
- 6 Replies
- Last post
by Damien Watkins - MSFT
- how I find one number if it is the primary number or not by recursion method in C++ language
-
- virtual destructor
by George2
- 12 Replies
- Last post
by George2
- Hello everyone,
What is the purpose of virtual destructor If currently, no derived class
thanks in advance, George
-
- Beta 2 error, Project : error PRJ0003 : Error spawning 'cmd.exe'.
by andrewness
- 14 Replies
- Last post
by Srikanth_mr
- Hi, I've just installed the new visual c++ beta 2, and I get this weird error when compiling a project. ------ Build started: Project: FindWeights, Configuration: Debug Win32 ------ Embedding manifest... Project : error PRJ0003 : Error spawning 'cmd.exe'. Build log was saved at " file://c:\My\Active\FindWeights\Debug\BuildLog.htm " FindWeights - 1 error(s), 0 warning(s) ========== Build: 0 s
-
- Compiling Older C++ Versions In Visual Studio 2005
by Slugger25
- 4 Replies
- Last post
by Sahir Shah
- I'm about to start supporting an application that was developed in Visual C++ 5.0.
What problems will I encounter if I compiled the code in Visual Studio 2005
Can anyone give me some indication of the effort to bring the Visual C++ 5.0 code
up to Visual Studio 2005 version of Visual C++
I know the app is a Windows app developed with MFC. I do not know the extent to
which
-
- Help please!
by Hellish
- 14 Replies
- Last post
by Hellish
- hello,
when i try to compile (build) a project it gives me this error:
Instance_ShadowfangKeep.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl HandleShutdown(class Socket *,unsigned long)" ( __imp_ HandleShutdown@@YAXPAVSocket@@K@Z )
it gives me 32 errors so a other error is like:
Instance_moltencore.obj : error LNK2001: unr
-
- 4 errors in 'sal.h' when compiling
by Demize
- 2 Replies
- Last post
by Demize
- c:\program files\microsoft visual studio 8\vc\include\sal.h(226) : error C2143: syntax error : missing ';' before 'string' c:\program files\microsoft visual studio 8\vc\include\sal.h(226) : error C2059: syntax error : 'string' c:\program files\microsoft visual studio 8\vc\include\sal.h(226) : error C2143: syntax error : missing ';' before '{' c:\program
files\microsoft visual studio 8\vc\include\
-
- Interface look like hang
by davidlks83
- 6 Replies
- Last post
by Sahir Shah
- Dear all,
I am doing file transfer software to transfer selected folder to destinastion folder. I use a progress bar to show the progress of the transfering. It seem normal but if the folder i want to transer is very large like few gigabyte and i switch to other window or other software then come back to the file transfer software the interface will be hang. Can i know how to fix it, becau
-
- error C2665: 'operator new' : none of the 5 overloads can convert parameter 1 from type 'const char [71]'
by Rajith
- 14 Replies
- Last post
by HEBU
- When I try to compile the programe in VC7, I got some errors mensioned below, how to resolve them, suggest me.
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xmemory(34) : error C2665: 'operator new' : none of the 5 overloads can convert parameter 1 from type 'const char [71]' c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\new.h(100): could be 'void *operator
-
- Color a progressbar: PBM_SETBATCOLOR seems not to work
by U412
- 9 Replies
- Last post
by Sahir Shah
- Hi everyone...
I use following code:
Code Snippet
COLORREF color1, color2;
color1 = m_ProgressGreen.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0));
m_ProgressGreen.Invalidate(TRUE);
color2 = m_ProgressBlue.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(0, 0, 255));
m_ProgressBlue.Invalidate(TRUE);
There is no effect, whethere i
-
- Accessing a DLL from a windows console C application
by Vodka Bob
- 14 Replies
- Last post
by Andreas Masur
- I am writing a ¡®C¡¯ application in ¡°windows console¡± that needs to access a .DLL that provides functions access a bus controller connected to the USB. The DLL has .h and .lib files. The header file references the functions using _stdcall. I¡¯ve tried several snippets from the MicroSoft help to no avail. Visual Studio 2005 reports a link error for each of the function calls. Thought I had it once onl