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

C / C++ / MFC

 
AnswerRe: wierd delete [ ] myClass exception. Need Help PLZ! Pin
eli1502197914-Jan-07 3:48
eli1502197914-Jan-07 3:48 
QuestionPointers to classes Pin
Oliver12313-Jan-07 16:52
Oliver12313-Jan-07 16:52 
AnswerRe: Pointers to classes Pin
bob1697213-Jan-07 17:00
bob1697213-Jan-07 17:00 
Questionchange the highlight for a button Pin
PrabhuDev13-Jan-07 9:56
PrabhuDev13-Jan-07 9:56 
AnswerRe: change the highlight for a button Pin
Mark Salsbery13-Jan-07 10:20
Mark Salsbery13-Jan-07 10:20 
QuestionUSB port controlling in vc++ Pin
ahmad al-omar13-Jan-07 9:11
ahmad al-omar13-Jan-07 9:11 
AnswerRe: USB port controlling in vc++ Pin
Nader Elshehabi13-Jan-07 11:16
Nader Elshehabi13-Jan-07 11:16 
Questionitoa() arguments problem Pin
CAgent00713-Jan-07 7:50
CAgent00713-Jan-07 7:50 
To my fellow programmers, I come forth again with another issue.

For review, I am reading from an MS Access database into a console app. In the database, I have data all being read by the console app as strings. However, there are two pieces of data I wish to convert from string to integer. Here is the code:

<br />
CoInitialize(NULL);<br />
try<br />
{<br />
_RecordsetPtr pGetInfo("ADODB.Recordset");<br />
_bstr_t strMyDB("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=FinalDB.mdb");<br />
pGetInfo->Open("SELECT * FROM [Video];", strMyDB, adOpenKeyset, adLockOptimistic, adCmdText);<br />
	pGetInfo->MoveFirst();<br />
	while (!pGetInfo->EndOfFile)<br />
	{<br />
	sID = (char*) ( (_bstr_t) pGetInfo->GetFields()->GetItem("Vid_ID")->GetValue() );<br />
	sTitle = (char*) ( (_bstr_t) pGetInfo->GetFields()->GetItem("Vid_Title")->GetValue() );<br />
	sFormat = (char*) ( (_bstr_t) pGetInfo->GetFields()->GetItem("Vid_Format")->GetValue() );<br />
//... the two pieces of info will read just like the above three lines<br />
pGetInfo->MoveNext();<br />
	iIndex++;<br />
        }<br />
	pGetInfo->Close();<br />
}


Now, thanks for the answer to VuNic and CoffeeAddict(##), I am supposed to itoa() the (char*) as so:
<br />
iVidTotal = itoa(sAmount); // string sAmount<br />
iAvailable= itoa(sAvailable); //string sAvailable<br />

However, eh... Unsure | :~ ... when I compile under MS's IDE 2003, I get that the itoa() doesn't take only 1 argument. When I checked the MSDB, it requires three arguments, each I have no certain idea what they do. Just remember, I have the header <stdlib.h> in my header file, just to let you guys know. So, yeah.... I thank you guys in advanced.

Like a friend said, "TOO GOOD!" ありがとうございます!

AnswerRe: itoa() arguments problem Pin
Mark Salsbery13-Jan-07 9:11
Mark Salsbery13-Jan-07 9:11 
GeneralDoh!! Pin
CAgent00713-Jan-07 13:17
CAgent00713-Jan-07 13:17 
AnswerRe: itoa() arguments problem Pin
Dennis Gourjii13-Jan-07 9:12
Dennis Gourjii13-Jan-07 9:12 
QuestionMultithreaded appication design question Pin
softwaremonkey13-Jan-07 5:25
softwaremonkey13-Jan-07 5:25 
AnswerRe: Multithreaded appication design question Pin
Mark Salsbery13-Jan-07 6:43
Mark Salsbery13-Jan-07 6:43 
GeneralRe: Multithreaded appication design question Pin
softwaremonkey13-Jan-07 7:32
softwaremonkey13-Jan-07 7:32 
QuestionString table and "an unnamed file" Pin
kdehairy13-Jan-07 5:16
kdehairy13-Jan-07 5:16 
QuestionMessage Box in Thread Pin
Max++13-Jan-07 4:59
Max++13-Jan-07 4:59 
AnswerRe: Message Box in Thread Pin
Eytukan13-Jan-07 21:59
Eytukan13-Jan-07 21:59 
AnswerRe: Message Box in Thread Pin
Eytukan14-Jan-07 17:38
Eytukan14-Jan-07 17:38 
Questionvs2005 migration issue Pin
sdfkfggh13-Jan-07 4:35
sdfkfggh13-Jan-07 4:35 
AnswerRe: vs2005 migration issue Pin
sdfkfggh13-Jan-07 5:14
sdfkfggh13-Jan-07 5:14 
GeneralRe: vs2005 migration issue Pin
Hamid_RT15-Jan-07 6:48
Hamid_RT15-Jan-07 6:48 
QuestionIs Transition to .NET The general trend? Pin
YoungYong, Park13-Jan-07 3:03
YoungYong, Park13-Jan-07 3:03 
AnswerRe: Is Transition to .NET The general trend? Pin
#realJSOP13-Jan-07 3:25
professional#realJSOP13-Jan-07 3:25 
QuestionHow to put the contain of textBox that related in button event to database access Pin
arif_setyawan13-Jan-07 2:33
arif_setyawan13-Jan-07 2:33 
AnswerRe: How to put the contain of textBox that related in button event to database access Pin
Hamid_RT15-Jan-07 6:47
Hamid_RT15-Jan-07 6:47 

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.