Click here to Skip to main content
15,902,842 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Clear ListBox Pin
led mike19-May-07 17:16
led mike19-May-07 17:16 
GeneralRe: Clear ListBox Pin
Star0919-May-07 18:04
Star0919-May-07 18:04 
GeneralRe: Clear ListBox Pin
Rajesh R Subramanian19-May-07 22:44
professionalRajesh R Subramanian19-May-07 22:44 
AnswerRe: Clear ListBox Pin
Immunity1819-May-07 23:52
Immunity1819-May-07 23:52 
QuestionExtract a string from another, C++ Pin
C_Zealot19-May-07 14:42
C_Zealot19-May-07 14:42 
AnswerRe: Extract a string from another, C++ Pin
Christian Graus19-May-07 17:08
protectorChristian Graus19-May-07 17:08 
GeneralRe: Extract a string from another, C++ Pin
C_Zealot19-May-07 17:14
C_Zealot19-May-07 17:14 
AnswerRe: Extract a string from another, C++ Pin
bob1697219-May-07 20:56
bob1697219-May-07 20:56 
Your slashes are backwards
"C:Program Files/Local_user/Visual Studio 2005/Project/Debugger/cosc.exe"
should be
"C:Program Files\Local_user\Visual Studio 2005\Project\Debugger\cosc.exe"

/////////////////////////

std::string sPath="C:Program Files\\Local_user\\Visual Studio 2005\\Project\\Debugger\\cosc.exe";
std::string sSearch="cosc.exe";

// If looking for the string directly
int nIndex=sPath.find(sSearch);
TRACE("Found \"%s\" at index = %d\n",sSearch.c_str(),nIndex);

/*
If you need to search out the filename
from a given path
*/
nIndex=sPath.rfind("\\");

std::string sExtract=sPath.substr(nIndex+1,sPath.length()-nIndex);

TRACE("Found '\\' at index = %d\n",nIndex);
TRACE("Filename from path is \"%s\"\n",sExtract.c_str());
GeneralRe: Extract a string from another, C++ Pin
C_Zealot19-May-07 20:58
C_Zealot19-May-07 20:58 
AnswerRe: Extract a string from another, C++ Pin
Stephen Hewitt20-May-07 15:50
Stephen Hewitt20-May-07 15:50 
QuestionProblem with Pointers at 2D Array p[][2] [modified] Pin
Immunity1819-May-07 13:17
Immunity1819-May-07 13:17 
AnswerRe: Problem with Pointers at 2D Array p[][2] Pin
Immunity1819-May-07 13:25
Immunity1819-May-07 13:25 
GeneralRe: Problem with Pointers at 2D Array p[][2] Pin
bob1697219-May-07 19:59
bob1697219-May-07 19:59 
AnswerRe: Problem with Pointers at 2D Array p[][2] Pin
bob1697219-May-07 21:16
bob1697219-May-07 21:16 
GeneralRe: Problem with Pointers at 2D Array p[][2] Pin
Immunity1819-May-07 23:50
Immunity1819-May-07 23:50 
GeneralRe: Problem with Pointers at 2D Array p[][2] Pin
David Crow21-May-07 3:56
David Crow21-May-07 3:56 
QuestionGif me a Lesson in Data types (int string float double) [modified] Pin
Immunity1819-May-07 11:23
Immunity1819-May-07 11:23 
AnswerRe: Gif me a Lesson in Data types (int string float double) Pin
CPallini19-May-07 11:31
mveCPallini19-May-07 11:31 
GeneralRe: Gif me a Lesson in Data types (int string float double) Pin
Immunity1819-May-07 11:39
Immunity1819-May-07 11:39 
GeneralRe: Gif me a Lesson in Data types (int string float double) Pin
CPallini19-May-07 12:01
mveCPallini19-May-07 12:01 
GeneralRe: Gif me a Lesson in Data types (int string float double) Pin
David Crow21-May-07 4:02
David Crow21-May-07 4:02 
GeneralRe: Gif me a Lesson in Data types (int string float double) Pin
Immunity1819-May-07 11:41
Immunity1819-May-07 11:41 
GeneralRe: Gif me a Lesson in Data types (int string float double) Pin
CPallini19-May-07 11:59
mveCPallini19-May-07 11:59 
GeneralRe: Gif me a Lesson in Data types (int string float double) Pin
Immunity1819-May-07 12:02
Immunity1819-May-07 12:02 
QuestionRe: Gif me a Lesson in Data types (int string float double) Pin
David Crow21-May-07 4:04
David Crow21-May-07 4:04 

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.