|
subramanyeswari wrote: Now when i declare a class instance and invoke one of the function with possible set of parameters(by including that cpp in my application)
You should not include the .cpp the file but the .h file. Because .cpp files contain the definitions of the functions declared in .h file.
Definitions are included when you link to the dll . So no need for .cpp files here.
Nibu thomas
Software Developer
|
|
|
|
|
The .h file contains one structure definition and 4 export function declarations. No other class definitions whereas the .cpp file contains the class definitions(ex..VXItelImpl is a class defined in .cpp and its implementation is also there in .cpp)not .h file. We write test cases for the four export functions. Now we have to cover the other class definitions and implementations which are declared in .cpp.
So i can't avoid including the cpp or is there any other option.
Regards
|
|
|
|
|
subramanyeswari wrote: (ex..VXItelImpl is a class defined in .cpp and its implementation is also there in .cpp)not .h file.
This is bad.
I can suggest you this. Since you are having both .cpp and .h files you can remove the export qualifiers for classes as well as functions.
Nibu thomas
Software Developer
|
|
|
|
|
Hello Subramanyeshwari !
you just try to separate your implementation part and definition part using .cpp files and .h files. Did you check that your .cpp file has been include in more that one file? And try to put some code description over here to get more clarity !
-Malli...!
|
|
|
|
|
can i hide a modal dialog box while opening the .exe?
JAYARAJ
|
|
|
|
|
|
what is conversion regular from int to dotted ?
|
|
|
|
|
inet_ntoa()
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
hey,
i need to create a web browser control for my app. i'm using mfc, and don't want to use .net's web browser control (unless i can statically link it).
ive searched the articles and found a few things, but they are all pretty complicated. i don't need to display the page, just connect to a server and store the html code in a string.
is their a simple way to do this?
thanks in advance,
sam kline
|
|
|
|
|
If you are using webbrowser control, when load completes you must use IHTMLDocument and related interfaces to retrieve the code but in your case, my recomendation is to use sockets to connect to the server, send it the minimal http request header and parse the response.
I believe it can be less complicated and avoid webcontrol dependency.
Best regards,
Mauro.
|
|
|
|
|
Have a look at the MFC internet class - CInternetFile etc. They will let you download a web page as a CFile object that you can just call Read() on to get the page data.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
|
thats what i used.
thanks & nice article.
Sam Kline
|
|
|
|
|
How can I add a carriage return at the end of a CString?
|
|
|
|
|
CString s;
s += _T("\n");
s += _T("\r\n");
Steve
|
|
|
|
|
Thanks a lot. I don't know why I didn't think of that.
|
|
|
|
|
isn't \n\r work or \r\n ..!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
It depends on what the string will be written to. If it's a text file, use \r\n uness you're going to be using the C I/O functions, in which case use \n and let the CRT change it to \r\n on its own. For multi-line text boxes, use \r\n .
\n\r is never right.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Michael Dunn wrote: \n\r is never right.
Right
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Can Any one please tell me how can I compile and see the result(on the screen) of the following program using VisualStudio?
include<stdio.h>
main()
{
int i=3;
int*j;
j = &i;
printf("The value of i=%d",*j);
}
|
|
|
|
|
Though I personally use streams (cout) for my programs at school, and I am not familiar with the printf() function, If you are using VC++.Net, I think you actually have to put a system("pause"); at the end of your program or it will not remain open long enough for you to see anything... other than that, you'll have to wait for someone else to answer. I hope it helps!
sincerely, Brett Peirce - PolerBear
To err is human; To forgive: divine.
|
|
|
|
|
use getch() function at last,declare in conio.h
|
|
|
|
|
Hi! I have a template function problem.
This is what I tried to do:
First, I created a .lib file called writeValue.lib, using this source code:
<br />
#include <iostream><br />
<br />
template <class T><br />
void __cdecl writeValue( T value )<br />
{<br />
std::cout << value << flush;<br />
}<br />
Then, I tried to build a Win32 Console Project, in which I put a single file called main.cpp, containing the following lines:
<br />
template <class T><br />
extern void __cdecl writeValue( T value );<br />
<br />
#pragma comment( lib, "writeValue" )<br />
<br />
int main( void )<br />
{<br />
writeValue <int> ( 10 );<br />
<br />
return 0;<br />
}<br />
It compiles, so I get a main.obj, it links writeValue.lib, but I get a link error when I try to use the writeValue( ) function with an integer parameter:
error LNK2019: unresolved external symbol "void __cdecl writeValue<int>(int)" (??$writeValue@H@@YAXH@Z) referenced in function _main
- even though the writeValue( ) function is defined (as a template) in the writeValue.lib file.
All was done in Microsoft Visual Studio .NET Professional 2003.
Can anyone help me with this, please? Thank you!
|
|
|
|
|
|
I want to invoke a certain method when a edit control is double clicked, but i cant seem to find any info on the event handling that i need to do. Any help would be appriacated, thank you.
"There are 10 types of people, those who understand binary, and those who don't."
- Somebody, not me.
|
|
|
|