Click here to Skip to main content
15,919,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: moving a mfc app into a dll Pin
Mark Salsbery22-Jul-07 10:05
Mark Salsbery22-Jul-07 10:05 
GeneralRe: moving a mfc app into a dll Pin
DevMentor.org22-Jul-07 10:17
DevMentor.org22-Jul-07 10:17 
AnswerRe: moving a mfc app into a dll Pin
DevMentor.org23-Jul-07 10:39
DevMentor.org23-Jul-07 10:39 
Questionhow to get Cwnd object Pin
Max++21-Jul-07 21:46
Max++21-Jul-07 21:46 
AnswerRe: how to get Cwnd object Pin
#realJSOP22-Jul-07 0:27
professional#realJSOP22-Jul-07 0:27 
AnswerRe: how to get Cwnd object Pin
ThatsAlok22-Jul-07 17:56
ThatsAlok22-Jul-07 17:56 
AnswerRe: how to get Cwnd object Pin
Hamid_RT31-Jul-07 19:48
Hamid_RT31-Jul-07 19:48 
Questionerror C2061: syntax error : identifier 'search' Pin
jt900021-Jul-07 18:31
jt900021-Jul-07 18:31 
Hi, I have a function called "search" which is a program that searches MySQL database for a match.
I get "error C2061: syntax error : identifier 'search' " when I try to compile the whole program.

My function declaration is the following:

int search(int, char*);

I call the function by:

search(argc, *argv[]);

I do not quite understand the int argc, char* argv[] that's pass to the function, but they were from the MySQL examples my function is based on. I still get the same error message when I take them out.

THANKS IN ADVANCE for the help.


The entire funtion looks like:

int search(int argc, char* argv[])
{
;
MYSQL *hnd=NULL; // mysql connection handle
const char *sinf=NULL; // mysql server information

hnd = mysql_init(NULL);
if (NULL ==
mysql_real_connect(hnd,SERVER_NAME,DB_USER,DB_USERPASS,DB_NAME,0,NULL,0))
{
fprintf(stderr,"Problem encountered connecting to the %s database on
%s.\n",DB_NAME,SERVER_NAME);
}
else
{
fprintf(stdout,"Connected to the %s database on %s as user
'%s'.\n",DB_NAME,SERVER_NAME,DB_USER);
sinf = mysql_get_server_info(hnd);

if (sinf != NULL)
{
fprintf(stdout,"Got server information: '%s'\n",sinf);
showTables(hnd);
showContents(hnd,TABLE_OF_INTEREST);
}
else
{
fprintf(stderr,"Failed to retrieve the server information string.\n");
}

mysql_close(hnd);
}

return 0;
}

void showTables(MYSQL *handle)
{
MYSQL_RES *result=NULL; // result of asking the database for a listing
of its tables
MYSQL_ROW row; // one row from the result set

result = mysql_list_tables(handle,NULL);
row = mysql_fetch_row(result);
fprintf(stdout,"Tables found:\n\n");
while (row)
{
fprintf(stdout,"\t%s\n",row[0]);
row = mysql_fetch_row(result);
}
mysql_free_result(result);

fprintf(stdout,"\nEnd of tables\n");

return;
}

void showContents
(
MYSQL *handle,
const char *tbl
)
{
MYSQL_RES *res=NULL; // result of querying for all rows in table
MYSQL_ROW row; // one row returned
char sql[1024], // sql statement used to get all rows
commastr[2]; // to put commas in the output
int i,numf=0; // number of fields returned from the query

sprintf(sql,"select * from %s",tbl);
fprintf(stdout,"Using sql statement: '%s' to extract all rows from the
specified table.\n",sql);

if (!mysql_query(handle,sql))
{
res = mysql_use_result(handle);
if (res)
{
numf = mysql_num_fields(res);
row = mysql_fetch_row(res);
fprintf(stdout,"Rows returned:\n\n");
while (row)
{
commastr[0]=commastr[1]=(char)NULL;
for (i=0;i
AnswerRe: error C2061: syntax error : identifier 'search' Pin
Abhijeet Pathak22-Jul-07 4:41
Abhijeet Pathak22-Jul-07 4:41 
QuestionHow to get all the export functions of a dll Pin
kcynic21-Jul-07 17:37
kcynic21-Jul-07 17:37 
AnswerRe: How to get all the export functions of a dll Pin
Michael Dunn21-Jul-07 18:00
sitebuilderMichael Dunn21-Jul-07 18:00 
GeneralRe: How to get all the export functions of a dll Pin
kcynic21-Jul-07 18:53
kcynic21-Jul-07 18:53 
AnswerRe: How to get all the export functions of a dll Pin
DevMentor.org21-Jul-07 23:48
DevMentor.org21-Jul-07 23:48 
AnswerRe: How to get all the export functions of a dll Pin
ThatsAlok22-Jul-07 17:56
ThatsAlok22-Jul-07 17:56 
AnswerRe: How to get all the export functions of a dll Pin
kcynic22-Jul-07 18:23
kcynic22-Jul-07 18:23 
QuestionDon't understand what's required in order to use unmgd c++ class in c# app - help? Pin
sherifffruitfly21-Jul-07 10:32
sherifffruitfly21-Jul-07 10:32 
AnswerRe: Don't understand what's required in order to use unmgd c++ class in c# app - help? Pin
Mark Salsbery21-Jul-07 10:51
Mark Salsbery21-Jul-07 10:51 
GeneralRe: Don't understand what's required in order to use unmgd c++ class in c# app - help? Pin
sherifffruitfly21-Jul-07 11:17
sherifffruitfly21-Jul-07 11:17 
GeneralRe: Don't understand what's required in order to use unmgd c++ class in c# app - help? Pin
Mark Salsbery21-Jul-07 11:20
Mark Salsbery21-Jul-07 11:20 
AnswerRe: Don't understand what's required in order to use unmgd c++ class in c# app - help? Pin
Christian Graus21-Jul-07 11:08
protectorChristian Graus21-Jul-07 11:08 
GeneralRe: Don't understand what's required in order to use unmgd c++ class in c# app - help? Pin
sherifffruitfly21-Jul-07 11:16
sherifffruitfly21-Jul-07 11:16 
QuestionRegistry settings for all users (with user privileges) [modified] Pin
AnTri21-Jul-07 6:12
AnTri21-Jul-07 6:12 
AnswerRe: Registry settings for all users (with user privileges) Pin
Michael Dunn21-Jul-07 10:04
sitebuilderMichael Dunn21-Jul-07 10:04 
AnswerRe: Registry settings for all users (with user privileges) Pin
Mark Salsbery21-Jul-07 11:06
Mark Salsbery21-Jul-07 11:06 
QuestionSplit string Pin
dellthinker21-Jul-07 5:05
dellthinker21-Jul-07 5:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.