Click here to Skip to main content
15,879,474 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: figure out the error. Pin
Hamid_RT4-Dec-07 19:39
Hamid_RT4-Dec-07 19:39 
GeneralRe: figure out the error. Pin
Don Box4-Dec-07 19:47
Don Box4-Dec-07 19:47 
GeneralRe: figure out the error. Pin
Llasus4-Dec-07 21:00
Llasus4-Dec-07 21:00 
JokeSuggestion Pin
CPallini4-Dec-07 21:53
mveCPallini4-Dec-07 21:53 
GeneralRe: Suggestion Pin
Nelek4-Dec-07 22:36
protectorNelek4-Dec-07 22:36 
GeneralMoveWindow Pin
kk.tvm4-Dec-07 18:51
kk.tvm4-Dec-07 18:51 
GeneralRe: MoveWindow Pin
Parthi_Appu4-Dec-07 19:46
Parthi_Appu4-Dec-07 19:46 
Generalint value through string Pin
CodingLover4-Dec-07 18:18
CodingLover4-Dec-07 18:18 
Hi all,

I have a string(not a CString), actually a file path. As an example,

c:\Test\MyProject\G00062_002_01.srf<code><br />
<br />
Then in following way get some data.<br />
<br />
<code><br />
string FullPath = c:\Test\MyProject\G00062_002_01.srf;<br />
string filePath = FullPath.GetFileTitle(); <br />
<br />
string groupID; <br />
string sessionId; <br />
string partID; <br />
<br />
groupID = filePath.substr(1, 5); <br />
sessionId = filePath.substr(7, 3); <br />
partID = filePath.substr(11, 2);<br />
<code><br />
<br />
<br />
So my outputs are 00062, 002, 01 respectively as string type. I want to add those values in a database as int type. How should I do this conversion.<br />
<br />
Where I'm confusing is that, outputs are in string format. But actually there are some integers.


I appreciate your help all the time...
Eranga Smile | :)

AnswerRe: int value through string Pin
manish.patel4-Dec-07 18:56
manish.patel4-Dec-07 18:56 
GeneralRe: int value through string Pin
CodingLover4-Dec-07 19:23
CodingLover4-Dec-07 19:23 
GeneralRe: int value through string Pin
manish.patel4-Dec-07 19:37
manish.patel4-Dec-07 19:37 
GeneralRe: int value through string Pin
CodingLover4-Dec-07 20:04
CodingLover4-Dec-07 20:04 
GeneralRe: int value through string Pin
Cedric Moonen4-Dec-07 20:05
Cedric Moonen4-Dec-07 20:05 
GeneralRe: int value through string Pin
manish.patel4-Dec-07 20:21
manish.patel4-Dec-07 20:21 
GeneralRe: int value through string Pin
Cedric Moonen4-Dec-07 20:28
Cedric Moonen4-Dec-07 20:28 
GeneralRe: int value through string Pin
CodingLover4-Dec-07 20:22
CodingLover4-Dec-07 20:22 
GeneralRe: int value through string Pin
Cedric Moonen4-Dec-07 20:01
Cedric Moonen4-Dec-07 20:01 
GeneralRe: int value through string Pin
Hamid_RT4-Dec-07 20:07
Hamid_RT4-Dec-07 20:07 
GeneralRe: int value through string Pin
Cedric Moonen4-Dec-07 20:14
Cedric Moonen4-Dec-07 20:14 
GeneralRe: int value through string Pin
Hamid_RT4-Dec-07 20:28
Hamid_RT4-Dec-07 20:28 
GeneralRe: int value through string Pin
CodingLover4-Dec-07 20:12
CodingLover4-Dec-07 20:12 
GeneralRe: int value through string Pin
jhwurmbach5-Dec-07 1:26
jhwurmbach5-Dec-07 1:26 
GeneralRe: int value through string Pin
David Crow5-Dec-07 2:47
David Crow5-Dec-07 2:47 
GeneralRe: int value through string Pin
CodingLover5-Dec-07 18:05
CodingLover5-Dec-07 18:05 
QuestionRe: int value through string Pin
Hamid_RT4-Dec-07 18:59
Hamid_RT4-Dec-07 18:59 

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.