Click here to Skip to main content
15,920,576 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: unhandle exception Pin
Rajesh R Subramanian21-Apr-09 2:02
professionalRajesh R Subramanian21-Apr-09 2:02 
QuestionSetWindowText for static control Pin
sashoalm20-Apr-09 22:31
sashoalm20-Apr-09 22:31 
AnswerRe: SetWindowText for static control Pin
_AnsHUMAN_ 20-Apr-09 22:36
_AnsHUMAN_ 20-Apr-09 22:36 
GeneralRe: SetWindowText for static control Pin
sashoalm20-Apr-09 22:58
sashoalm20-Apr-09 22:58 
GeneralRe: SetWindowText for static control Pin
sashoalm20-Apr-09 23:01
sashoalm20-Apr-09 23:01 
GeneralRe: SetWindowText for static control Pin
_AnsHUMAN_ 20-Apr-09 23:04
_AnsHUMAN_ 20-Apr-09 23:04 
Questionvariable and class View Pin
durban220-Apr-09 21:11
durban220-Apr-09 21:11 
AnswerRe: variable and class View Pin
CPallini20-Apr-09 21:49
mveCPallini20-Apr-09 21:49 
QuestionWindows events Pin
sunny_vc20-Apr-09 19:05
sunny_vc20-Apr-09 19:05 
AnswerRe: Windows events Pin
Stuart Dootson20-Apr-09 20:09
professionalStuart Dootson20-Apr-09 20:09 
GeneralRe: Windows events Pin
sunny_vc20-Apr-09 20:15
sunny_vc20-Apr-09 20:15 
GeneralRe: Windows events Pin
Stuart Dootson20-Apr-09 21:05
professionalStuart Dootson20-Apr-09 21:05 
QuestionHow to Read data using IfStream in while loop? [modified] Pin
pohcb_sonic20-Apr-09 16:31
pohcb_sonic20-Apr-09 16:31 
QuestionRe: How to Read data using IfStream? Pin
David Crow20-Apr-09 17:17
David Crow20-Apr-09 17:17 
AnswerRe: How to Read data using IfStream? Pin
pohcb_sonic20-Apr-09 18:42
pohcb_sonic20-Apr-09 18:42 
QuestionRe: How to Read data using IfStream? Pin
David Crow21-Apr-09 3:12
David Crow21-Apr-09 3:12 
AnswerRe: How to Read data using IfStream? Pin
pohcb_sonic21-Apr-09 14:31
pohcb_sonic21-Apr-09 14:31 
QuestionRe: How to Read data using IfStream? Pin
David Crow22-Apr-09 2:50
David Crow22-Apr-09 2:50 
QuestionHaving trouble converting Java Code to C++ Pin
NxtGr8One20-Apr-09 16:23
NxtGr8One20-Apr-09 16:23 
AnswerRe: Having trouble converting Java Code to C++ Pin
David Crow20-Apr-09 16:51
David Crow20-Apr-09 16:51 
QuestionC++ Directory Functions Pin
gamefreak229120-Apr-09 15:37
gamefreak229120-Apr-09 15:37 
AnswerRe: C++ Directory Functions [modified] Pin
Joe Woodbury20-Apr-09 16:33
professionalJoe Woodbury20-Apr-09 16:33 
GeneralRe: C++ Directory Functions Pin
gamefreak229120-Apr-09 17:01
gamefreak229120-Apr-09 17:01 
QuestionRe: C++ Directory Functions Pin
David Crow20-Apr-09 17:37
David Crow20-Apr-09 17:37 
AnswerRe: C++ Directory Functions Pin
gamefreak229120-Apr-09 18:16
gamefreak229120-Apr-09 18:16 
Thanks again, opened up my book, went right to str functions found strcmp and here is the working code:

// The Code is Borland's, I just modified it
// to make it Standard C++

#include <direct.h> // for getcwd
#include <stdlib.h>// for MAX_PATH
#include <windows.h>
#include <iostream> // for cout and cin

using namespace std;

// function to return the current working directory
// this is generally the application path
void GetCurrentPath(char* buffer)
{
getcwd(buffer, _MAX_PATH);
}

int main()
{

// _MAX_PATH is the maximum length allowed for a path
char CurrentPath[_MAX_PATH];
// use the function to get the path
GetCurrentPath(CurrentPath);

// display the path for demo purposes only
char temp[_MAX_PATH];
char temp1[_MAX_PATH]={"C:\\Program Files\\uTorrent"};
if(strcmp(CurrentPath, temp1)==0){
cout << CurrentPath << endl;

cout << temp1 << endl;}         
cout << "Press Enter to continue";
cin.getline(temp,_MAX_PATH);
return 0;
}</iostream></windows.h></stdlib.h></direct.h>

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.