Click here to Skip to main content
16,007,779 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Who has file open on server Pin
WalthamstowBoyInSydney12-Dec-01 16:44
WalthamstowBoyInSydney12-Dec-01 16:44 
GeneralRe: Who has file open on server Pin
Bill Wilson13-Dec-01 5:58
Bill Wilson13-Dec-01 5:58 
GeneralCString::Replace in C++ without MFC Pin
11-Dec-01 15:14
suss11-Dec-01 15:14 
GeneralRe: CString::Replace in C++ without MFC Pin
Nick Blumhardt11-Dec-01 15:39
Nick Blumhardt11-Dec-01 15:39 
GeneralRe: CString::Replace in C++ without MFC Pin
Alvaro Mendez12-Dec-01 8:00
Alvaro Mendez12-Dec-01 8:00 
GeneralNewbie in need of a little help Pin
John L. DeVito11-Dec-01 12:50
professionalJohn L. DeVito11-Dec-01 12:50 
GeneralRe: Newbie in need of a little help Pin
Jon Sagara11-Dec-01 12:58
Jon Sagara11-Dec-01 12:58 
GeneralRe: Newbie in need of a little help Pin
11-Dec-01 18:30
suss11-Dec-01 18:30 
I'll have a go at it...

/************************************************\
* Class Definition *
\************************************************/
#include <<someheaderhere>>
using namespace std;

class CLogin{

private:
char m_Username[15];
char m_Password[15];
char m_UserNames[2][9];

// Can't do this here. Need to do this through a member function
// or a constructor
char m_Usernames[2][9]={"John","Bob"};

public:

CLogin() // Default Constructor
void getUsername();
};

/***************************************************\
* Class Implementation *
\***************************************************/
CLogin::CLogin()
{
m_Username[0] = ' ';
m_Password[0] = ' ';
m_UserNames[0][0] = {' ',' '};
}

void CLogin::getUsername()
{
cout<<"Enter user name: ";
cin>>m_Username;
cout<<"You entered: "<<m_username;
}

********************************************\
*="" program="" entry="" point="" *
\********************************************=""
int="" main(void){
clogin="" login;

login.getusername();

return(1);
}

it="" should="" be="" cleaned="" up="" enough="" now="" to="" allow="" you="" compile="" it.

you="" initialize="" your="" variables="" through="" the="" class="" constructor="" or="" another="" member="" function.="" take="" time="" learn="" about="" standard="" string="" class...="" you'll="" never="" use="" char="" array's="" again="" Wink | ;) =""

good="" luck="" and="" happy="" programming="" Cool | :cool: =""

<b="">Paul Lyons

Do not go where the path may lead, go instead where there is no path and leave a trail.
- Ralph Waldo Emerson
GeneralRe: If I'm not mistaken... Pin
Atul Dharne11-Dec-01 23:38
Atul Dharne11-Dec-01 23:38 
QuestionHowto get text from editbox of another application? Pin
Goa11-Dec-01 12:46
Goa11-Dec-01 12:46 
AnswerRe: Howto get text from editbox of another application? Pin
Christian Graus11-Dec-01 13:03
protectorChristian Graus11-Dec-01 13:03 
GeneralRe: Howto get text from editbox of another application? Pin
Goa11-Dec-01 13:36
Goa11-Dec-01 13:36 
GeneralRe: Howto get text from editbox of another application? Pin
Christian Graus11-Dec-01 13:41
protectorChristian Graus11-Dec-01 13:41 
GeneralRe: Howto get text from editbox of another application? Pin
Goa12-Dec-01 6:26
Goa12-Dec-01 6:26 
GeneralRe: Howto get text from editbox of another application? Pin
Ernest Laurentin12-Dec-01 6:33
Ernest Laurentin12-Dec-01 6:33 
GeneralRe: Howto get text from editbox of another application? Pin
Ravi Bhavnani12-Dec-01 6:37
professionalRavi Bhavnani12-Dec-01 6:37 
AnswerRe: Howto get text from editbox of another application? Pin
Sito Dekker11-Dec-01 20:55
Sito Dekker11-Dec-01 20:55 
GeneralLinking Controls with Shared Memory locations at program time Pin
SandeepK11-Dec-01 10:44
SandeepK11-Dec-01 10:44 
GeneralCListCtrl / Timer Pin
11-Dec-01 10:35
suss11-Dec-01 10:35 
GeneralNever Mind Pin
11-Dec-01 11:17
suss11-Dec-01 11:17 
GeneralBitmap Stuff Pin
Mark Donkers11-Dec-01 9:19
Mark Donkers11-Dec-01 9:19 
GeneralRe: Bitmap Stuff Pin
Rick York11-Dec-01 9:53
mveRick York11-Dec-01 9:53 
GeneralRe: Bitmap Stuff Pin
Mark Donkers11-Dec-01 10:17
Mark Donkers11-Dec-01 10:17 
GeneralRe: Bitmap Stuff Pin
Rick York11-Dec-01 10:41
mveRick York11-Dec-01 10:41 
GeneralRe: Bitmap Stuff Pin
Ernest Laurentin11-Dec-01 10:57
Ernest Laurentin11-Dec-01 10:57 

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.