Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

A problem of Protoolkit development<ProMessage>

bata

New member
In my example,when I build the program.there are a error about ProMessageDisplay below:



ProMessageDisplay(messagefile,USER %0s,Success run promessage.);



error C2660: 'ProMessageDisplay' : function does not take 3 parameters



I have include the head file:

#include

#include

#include

#include

#include

#include

#include <user_tk_error.h>

#include

#include

#include <TestError.h>

#include UtilMessage.h

#include UtilString.h



thank u very much
 
First, you need to #include ProMessage.h



Also, I am curious as to your actual parameters that you are passing in.... From what I can see, you want the message to simply display Success run promessage.

The first parameter seems OK as it is likely a char * of a file name.

The second one seems like a potential issue... it may not like the % sign in there.

Also, the 3rd parameter and higher, must be the _address_ of the string (or int, etc) you want in there. I know that the similiar C call of printf would accept this, but ProMessageDisplay may have a hard time with it. Try the follwing:



char message[20];

strcpy( message, Success run promessage );

ProMessageDisplay( messagefile, USER test, message );



And make sure to change the lines in your messagefile to reflect the change from User %0s to User test - the first line only... the second line should retain the %0s obviously.



Good Luck,

Richard
 
Include the following header files:



ProToolkit.h

ProMessage.h





See that you have declared messagefile and the message file has the proper syntax.



USER %0s

#

#



Your program should compile w/o errors now.
 
Set in the preprosesor


PRO_USE_VAR_ARGS


I had that problen a while ago





if you have any problem let me know


Regards
 

Sponsor

Articles From 3DCAD World

Back
Top