|
In order to see the linker error all you have to do is
declaring your function without it's definition like this:
<br />
#include <br />
using namespace std;<br />
<br />
void foo(int x);
<br />
int main()<br />
{ int x = 0; <br />
foo(x);
return 0;<br />
}<br />
<br />
|
|
|
|
|
How to remove this 2px line on the top of ReBar control? I've found a RBS_BANDBORDERS style using spy++ but removing this style does not help (neither by calling CReBar::Create(this,0) nor by CReBar::ModifyStyle(RBS_BANDBORDERS,0) - even without this style control still has a line on the top.
Any idea how to disable this line?
Thanks in advance!
|
|
|
|
|
I am having some difficulty passing an array. If someone can shed some light here, I would appreciate it greatly.
void testFunction(int, int, bool, int, int, int [ ], char);
<br />
void testProgram()<br />
{<br />
int testCaseArray1[ 9 ] = { 500, 250, 375, 438, 469, 485, 493, 497, 499 };<br />
char choice1 = 'Y';<br />
<br />
testFunction(0, 0, false, 499, 9, testCaseArray1, 'Y');<br />
}<br />
<br />
void testFunction(int myGuess1, int myGuessCount1, bool myBool, int myInt1, int myInt2, int myArray[ ], char myChar='Y')<br />
{<br />
int num1 = myInt1;<br />
int arraySize1 = myInt2;<br />
int guess1 = myGuess1;<br />
int testCaseArray1[ arraySize1 ];
int guessCount1 = 0;<br />
char choice1 = myChar;<br />
bool correctAnswer1 = myBool;
|
|
|
|
|
You should declare your function this way:
void testFunction(int, int, bool, int, int, int*, char);
There is another thing wrong in your program. This line:
int testCaseArray1[ arraySize1 ];
You cannot declare an array this way (arraySize1 is not a constant). You need to dynamically allocate your array:
int* testCaseArray1 = new int[arraySize1];
And don't forget to delete it when you don't need it anymore.
I would suggest that you take a look at container classes from the STL. It might be hard to understand for a beginner but it solves a lot of problems (memory management and so on).
|
|
|
|
|
OK, but where is your question?
ericelysia wrote: int testCaseArray1[ arraySize1 ];
That won't work because you have to initialize your array with constant expressions. So the array should be defined like this: int testCaseArray1[5];
If you want to initialize different size arrays you have to use
new operand with pointer:
int mySize;<br />
mySize=5;<br />
int *testCaseArray1=new int[mySize]; . When the array initialized with new operand is no longer needed you have to delete it with delete operand: delete [] testCaseArray1;
|
|
|
|
|
I have created a package for my project using visual studio installer , package created successfully. While creating package I have added all required files from dll and also from exe, related files.
I am trying to install the package in a system which does not have Visual Studio,
While I am installing the package I am getting error
Error 1904: module c:\ programming files \ DemoSoft\Demo.dll failed to register HRESULT 2147024770 , contact your support personal
|
|
|
|
|
Can anyone give Video tutorial of VS2005 IDE, VC++ - MFC-Win32- Application tutorial.
|
|
|
|
|
This is a very broad subject that simply cannot covered in a single post. The best way for you to learn is either learn by yourself or buy a good book on the subject (or find free tutorials on the web).
|
|
|
|
|
Cedric,
I am familiar with VC 6.0-IDE, MFC, Win32 etc.
What i am looking for is some good video which explain VS 2005 IDE and using MFC, ATL & other new stuffs of VS 2005
|
|
|
|
|
No such video can explain you each and everything that is new. Buy a book. Nothing else will help you.
Never injure a friend, even in jest.
- Marcus Tullius Cicero
|
|
|
|
|
If you are familiar with VC6 and the MFC, then you shouldn't have troubles to move to VS 2005. There are some slight changes in the MFC but they are minor. And the IDE is not very difficult to understand once you understand VC6.
|
|
|
|
|
|
That's right! Why did I forget this
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
apparently, some idiots didn't like it
|
|
|
|
|
|
Do you want us to create the video for you?
Try GOOGLE![^]
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
|
Hello,
Can any body help me on my query…
I’m new to VC++6. I built an application for printer, in which I Read printerDriverData from windowsXp registry and write all the data in to a file in specific Location of hard-disk. Now I again want to import that data in the same location of registry with using a SetPrinterDataEx() function. But I’m not able to do it. Can any one help me of my query?
Plz guide me on my query…I’m so thankful to you
Ashish Bajpai
|
|
|
|
|
I wonder that, will the fundamentals of microsoft windows programming change with Vista?
|
|
|
|
|
It is mostly the same, I have ported most of my code to Vista. At most some Security issues have changed, but a lot of it makes sences.
As ever "The best Windows ever"
Greetings from Germany
|
|
|
|
|
Hi all.
I write service and now I am writing API(I use MFC Dialog form).
This API must install my service, but I have problem with it.
Wen I write:
<br />
SC_HANDLE schService;<br />
<br />
<br />
SC_HANDLE schSCManager;<br />
<br />
LPQUERY_SERVICE_CONFIG lpBuf;<br />
Or
<br />
schService = CreateService(<br />
schSCManager,<br />
MYServiceName,<br />
MYServiceName,<br />
SERVICE_ALL_ACCESS,<br />
SERVICE_WIN32_OWN_PROCESS,<br />
SERVICE_DEMAND_START,<br />
SERVICE_ERROR_NORMAL,<br />
"c:\\ntbk2\\src\\service\\small\\debug\\small.exe",<br />
NULL,<br />
NULL,<br />
"",<br />
NULL,<br />
NULL);<br />
Compile give me error message.
I include windows.h in my project, but noting. My program can't see thet CreateService() is function or 'LPQUERY_SERVICE_CONFIG' is struct.
I acnt see what I do wrong.
How can I install my service?
|
|
|
|
|
Check if you have latest platform SDK.
Have look at this FAQ[^].
|
|
|
|
|
|
Thanks.
|
|
|
|
|