Click here to Skip to main content
15,922,696 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: How to detect whether a reader is connected to a Serial port ? Pin
Roger Stoltz14-Oct-08 23:56
Roger Stoltz14-Oct-08 23:56 
QuestionRe: How to detect whether a reader is connected to a Serial port ? Pin
kapardhi15-Oct-08 0:12
kapardhi15-Oct-08 0:12 
AnswerRe: How to detect whether a reader is connected to a Serial port ? Pin
Roger Stoltz15-Oct-08 1:19
Roger Stoltz15-Oct-08 1:19 
QuestionRe: How to detect whether a reader is connected to a Serial port ? Pin
kapardhi15-Oct-08 23:24
kapardhi15-Oct-08 23:24 
AnswerRe: How to detect whether a reader is connected to a Serial port ? Pin
Roger Stoltz15-Oct-08 23:41
Roger Stoltz15-Oct-08 23:41 
QuestionHow to put all data and codes into one section within PE? Pin
Joseph Marzbani14-Oct-08 23:06
Joseph Marzbani14-Oct-08 23:06 
QuestionPlotting a Graph Using MSChart in MFC Pin
vikram kamaraj14-Oct-08 22:43
vikram kamaraj14-Oct-08 22:43 
QuestionC1004: unexpected end of file found Pin
Member 560524014-Oct-08 22:19
Member 560524014-Oct-08 22:19 
The following code is not compiling in .Net 1.1
[code]
This is the main project file for VC++ application project
// generated using an Application Wizard.

#include "stdafx.h"
#include <stdafx.h>
#include <ocilib.h>

using namespace System;

int _tmain(int argc, char *argv[])
{
OCI_Connection* cn;
OCI_Statement* st;
OCI_Resultset* rs;
int Counter = 0;
int ret;
FILE *TablesFile;
char *Database, *UserName, *UserPassword, *StartDate, *EndDate;
char Message[256] = "";
/* for (i=0; i<argc;> * {
* printf("%d %s\n", i, argv[i]);
* }
*/

Database = argv[1];
UserName = argv[2];
UserPassword = argv[3];
StartDate = argv[4];
EndDate = argv[5];
OCI_Initialize(NULL, NULL, OCI_ENV_DEFAULT);

cn = OCI_ConnectionCreate(Database, UserName, UserPassword, OCI_SESSION_DEFAULT);
st = OCI_StatementCreate(cn);
sprintf(Message, "select MemNumber,Turnover from (select mem_number MemNumber,sum(trans_turnover) Turnover from members join transact on mem_number = trans_code where Trans_date between '%s' and '%s' and mem_barred = 0 group by mem_number order by turnover desc ) where rownum <=200", StartDate, EndDate);
// printf("%s\n",Message);

OCI_ExecuteStmt(st, Message);
// OCI_ExecuteStmt(st,"select MemNumber,Turnover from (select mem_number MemNumber,sum(trans_turnover) Turnover from members join transact on mem_number = trans_code where Trans_date between '01-Jan-2004' and '14-Oct-2008' and mem_barred = 0 group by mem_number order by turnover desc ) where rownum < 201");
rs = OCI_GetResultset(st);
// printf("OCI_GetResultset() returns rs = %x\n", rs);
TablesFile = fopen("Tables.html", "wt");
while (OCI_FetchNext(rs))
{
fprintf(TablesFile, "% 4d - %u\n", ++Counter, OCI_GetDouble(rs, 1));
}
ret = fclose(TablesFile);
OCI_Cleanup();
return EXIT_SUCCESS;
}

[/code]
.Net returns C1004: unexpected end of file found
and as hard as I look I cannot see a missing or additional brace.
AnswerRe: C1004: unexpected end of file found Pin
_AnsHUMAN_ 14-Oct-08 22:51
_AnsHUMAN_ 14-Oct-08 22:51 
AnswerRe: C1004: unexpected end of file found Pin
Joseph Marzbani14-Oct-08 23:09
Joseph Marzbani14-Oct-08 23:09 
Question[Message Deleted] Pin
MsmVc14-Oct-08 20:54
MsmVc14-Oct-08 20:54 
QuestionRe: SetRange Pin
Rajesh R Subramanian14-Oct-08 20:59
professionalRajesh R Subramanian14-Oct-08 20:59 
Answer[Message Deleted] Pin
MsmVc14-Oct-08 21:18
MsmVc14-Oct-08 21:18 
GeneralRe: SetRange Pin
Rajesh R Subramanian14-Oct-08 21:25
professionalRajesh R Subramanian14-Oct-08 21:25 
RantRe: [Message Deleted] Pin
Rajesh R Subramanian15-Oct-08 3:20
professionalRajesh R Subramanian15-Oct-08 3:20 
QuestionBasic string manipulation question Pin
monsieur_jj14-Oct-08 20:42
monsieur_jj14-Oct-08 20:42 
AnswerRe: Basic string manipulation question Pin
Vijjuuu.14-Oct-08 21:02
Vijjuuu.14-Oct-08 21:02 
AnswerRe: Basic string manipulation question Pin
Jose David Pujo14-Oct-08 21:48
Jose David Pujo14-Oct-08 21:48 
AnswerRe: Basic string manipulation question Pin
CPallini14-Oct-08 22:57
mveCPallini14-Oct-08 22:57 
AnswerMe too! Pin
Rajesh R Subramanian15-Oct-08 0:16
professionalRajesh R Subramanian15-Oct-08 0:16 
GeneralRe: Me too! Pin
CPallini15-Oct-08 0:38
mveCPallini15-Oct-08 0:38 
GeneralRe: Me too! Pin
Rajesh R Subramanian15-Oct-08 0:44
professionalRajesh R Subramanian15-Oct-08 0:44 
GeneralRe: Me too! Pin
CPallini15-Oct-08 0:56
mveCPallini15-Oct-08 0:56 
GeneralRe: Me too! Pin
Jose David Pujo15-Oct-08 0:50
Jose David Pujo15-Oct-08 0:50 
GeneralRe: Me too! Pin
Rajesh R Subramanian15-Oct-08 0:55
professionalRajesh R Subramanian15-Oct-08 0:55 

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.