|
|
|
Please say me what is the difference betweem typename and class in templates ?
Thanks.
-:KNOX:-
-- modified at 9:11 Wednesday 28th June, 2006
|
|
|
|
|
AFAIK one difference is that
1)'typename' can only be used in template definitions.
2) 'class' - could be for both class and template definitions.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I think they both have the same effect when are used in template declaration:
template< class T > ...
can be replaced with:
template< typename T > ...
But typename keyword has one more meaning when is used within the declared template class.
-- modified at 9:32 Wednesday 28th June, 2006
|
|
|
|
|
Thanks for the help.
-:KNOX:-
|
|
|
|
|
When dealing with templates, there is no difference between them.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hey,
I've a string including multiple lines. Now I want to use the DrawText DT_CALC feature to calc the height of the bounding rectangle, but leave the right side as it is.
The returning rect has always a extended right side. How can I solve this problem?
Thank you...
<br />
CRect reRect(0,0,150,0);<br />
CString szText("Hallo\ndies ist ein Test\nHello\nthis is a test");<br />
pDC->DrawText(szText,&reRect, DT_CALCRECT);<br />
-- modified at 9:12 Wednesday 28th June, 2006
|
|
|
|
|
|
Maybe you should include DT_WORDBREAK flags?
pDC->DrawText(szText, reRect, DT_CALCRECT | DT_WORDBREAK);
|
|
|
|
|
try using \r\n instead of \n only in szText
|
|
|
|
|
Hi,
This is my first post in the List.
I'm trying to compile a C++ code that uses AxisCpp on Windows
I get the following error:
[Linker error] undefined reference to `axiscpp::Stub::Stub(char const*, axiscpp::AXIS_PROTOCOL_TYPE)'
I have included the necessary libraries (axis_client.lib,axis_server.lib) and also mentioned where to look for the axiscpp header files.
I'm using Dev-Cpp 4.9.9.2 IDE for compiling. I have the axis package from http://ws.apache.org/axis (axiscpp for windows)
I'm unable to compile in Eclipse with CDT Plugin, also.
I'm able to compile the same using Visual Studio VC7.0 onwards.
Does anyone know a solution to this problem? (any extra linker options?)
Regards,
Sriram.V
|
|
|
|
|
|
Hi Sarath,
It's a linker error. I'm able to link all my other libraries except axiscpp libraries.
I'm having axis-c-1.6b for win32. The axis package provides 2 libraries "axis_client.lib" and "axis_server.lib".
The cl compiler that Visual Studio uses is able to find the libraries and I'm able to execute my project, but the g++ compiler that comes with Dev-Cpp and Eclipse with CDT plugin is unable to find the axis libraries.
One guess is that, the library I'm using is not conformant to the mingw compiler
or Does any extra linker arguments need to be specified for linking only axis libraries?
Extract from compile log:
----------------------------------
g++.exe ../../../../../CVSWorkspace/MyProject/agent/src/register/RegisterAgent.o ../../../../../CVSWorkspace/MyProject/agent/src/register/Agent.o ../../../../../CVSWorkspace/MyProject/agent/src/webserviceclient/stubs/Query.o
-o "RegisterAgent.exe" -L"D:/Dev-Cpp/lib" -L"D:/AxisClient/axis-c/axis-c-1.6b-Win32-trace-bin/lib/axis" -L"D:/CVSWorkspace/MyProject/3rdparty/agent-lib" -L"D:/CVSWorkspace/MyProject/3rdparty/sql-lib" -L"D:/AxisClient/axis-c/axis-c-1.6b-Win32-trace-bin/lib/axis" ../../../../../CVSWorkspace/MyProject/3rdparty/sql-lib/sqlite3.lib ../../../../../AxisClient/axis-c/axis-c-1.6b-Win32-trace-bin/lib/axis/axis_client.lib
../../../../../CVSWorkspace/MyProject/agent/src/webserviceclient/stubs/Query.o(.text+0x154):Query.cpp: undefined reference to `axiscpp::Stub::Stub(char const*, axiscpp::AXIS_PROTOCOL_TYPE)'
../../../../../CVSWorkspace/MyProject/agent/src/webserviceclient/stubs/Query.o(.text+0x844):Query.cpp: undefined reference to `axiscpp::Stub::~Stub()'
collect2: ld returned 1 exit status
make.exe: *** [RegisterAgent.exe] Error 1
Execution terminated
----------------------------------
Regards,
Sriram.V
|
|
|
|
|
I would like to open a text file when i press a button in my dialog box. The text file has to be opened in the notepad editor. Which function should i use? I provide the full path of the text file
|
|
|
|
|
|
ShellExecute (NULL,"open","notepad.exe","c:\\abc.txt",NULL,SW_SHOW);
Cheers
"Peace of mind through Technology"
|
|
|
|
|
|
|
Hi i'm trying to write a small screensaver file with a swf file embeded inside.
I'm trying to run a screensaver but before it activates it changes the res of the monitor to 800x600 but im havin no luck can anyone help please
Max101
|
|
|
|
|
|
hello,
i am developing a project that needs to create 2d and 3d graphs using visual c++. please help me . what is the process??
sriv
-- modified at 8:19 Wednesday 28th June, 2006
|
|
|
|
|
|
I want to get the list of all the unsuccessful or broken installation in a computer. Is there any registry key from where i can get the list of all the unsuccessful or broken installation?
Can you please suggest any approach, that may be helpful in this context?
Thanks in advance.
|
|
|
|
|
Sorry. There is no egistry key from where you can get the list of all the unsuccessful or broken installations.
Ovidiu Cucu
Microsoft MVP - Visual C++
|
|
|
|