Click here to Skip to main content
15,891,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionText Box Pin
ScotDolan28-Feb-07 11:18
ScotDolan28-Feb-07 11:18 
AnswerRe: Text Box Pin
Mark Salsbery28-Feb-07 14:25
Mark Salsbery28-Feb-07 14:25 
QuestionPLEASE HELP :( Pin
İsmail Durmaz28-Feb-07 10:41
İsmail Durmaz28-Feb-07 10:41 
AnswerRe: PLEASE HELP :( Pin
Christian Graus28-Feb-07 10:49
protectorChristian Graus28-Feb-07 10:49 
GeneralRe: PLEASE HELP :( Pin
İsmail Durmaz28-Feb-07 10:52
İsmail Durmaz28-Feb-07 10:52 
GeneralRe: PLEASE HELP :( Pin
Christian Graus28-Feb-07 14:47
protectorChristian Graus28-Feb-07 14:47 
GeneralRe: PLEASE HELP :( Pin
Mark Salsbery28-Feb-07 14:26
Mark Salsbery28-Feb-07 14:26 
QuestionCant slow the program down Pin
Spartan1628-Feb-07 8:27
Spartan1628-Feb-07 8:27 
I cant get the program to display it appears then dispears very quickly.
someone please help
heres the code:

//Please someone help

#include <iostream>
#include <string>

using namespace std;

class Critter
{
//make following global functions friends of the Critter class
friend void Peek(const Critter& aCritter);
friend ostream& operator<<(ostream& os, const Critter& aCritter);

public:
Critter(const string& name = "");

private:
string m_Name;
};

Critter::Critter(const string& name):
m_Name(name)
{}

void Peek(const Critter& aCritter);
ostream& operator<<(ostream& os, const Critter& aCritter);

int main()
{
Critter crit("Poochie");

cout << "Calling Peek() to access crit's private data member, m_Name: \n";
Peek(crit);

cout << "\nSending crit object to cout with the << operator:\n";
cout << crit;

return 0;
}

//global friend function which can access all of a Critter object's members
void Peek(const Critter& aCritter)
{
cout << aCritter.m_Name << endl;
}

//global friend function which can access all of Critter object's members
//overloads the << operator so you can send a Critter object to cout
ostream& operator<<(ostream& os, const Critter& aCritter)
{
os << "Critter Object - ";
os << "m_Name: " << aCritter.m_Name;
return os;
}
AnswerRe: Cant slow the program down Pin
David Crow28-Feb-07 8:31
David Crow28-Feb-07 8:31 
GeneralRe: Cant slow the program down Pin
Spartan1628-Feb-07 8:37
Spartan1628-Feb-07 8:37 
GeneralRe: Cant slow the program down Pin
David Crow28-Feb-07 8:45
David Crow28-Feb-07 8:45 
GeneralRe: Cant slow the program down Pin
Spartan1628-Feb-07 8:51
Spartan1628-Feb-07 8:51 
GeneralRe: Cant slow the program down Pin
David Crow28-Feb-07 8:53
David Crow28-Feb-07 8:53 
GeneralRe: Cant slow the program down Pin
Spartan1628-Feb-07 8:55
Spartan1628-Feb-07 8:55 
QuestionFastest way to scale binary images?? Pin
pavanbabut28-Feb-07 7:49
pavanbabut28-Feb-07 7:49 
AnswerRe: Fastest way to scale binary images?? Pin
Chris Losinger28-Feb-07 8:05
professionalChris Losinger28-Feb-07 8:05 
GeneralRe: Fastest way to scale binary images?? Pin
pavanbabut28-Feb-07 8:45
pavanbabut28-Feb-07 8:45 
GeneralRe: Fastest way to scale binary images?? Pin
Chris Losinger28-Feb-07 9:25
professionalChris Losinger28-Feb-07 9:25 
GeneralRe: Fastest way to scale binary images?? Pin
pavanbabut28-Feb-07 9:36
pavanbabut28-Feb-07 9:36 
Questiontabcontrol: highlight tab Pin
aei_totten28-Feb-07 5:57
aei_totten28-Feb-07 5:57 
AnswerRe: tabcontrol: highlight tab Pin
KaЯl28-Feb-07 6:23
KaЯl28-Feb-07 6:23 
QuestionDetect SCSI Devices Pin
FoxholeWilly28-Feb-07 5:49
FoxholeWilly28-Feb-07 5:49 
QuestionThread Problem Pin
vibindia28-Feb-07 5:36
vibindia28-Feb-07 5:36 
AnswerRe: Thread Problem Pin
Roger Stoltz28-Feb-07 5:38
Roger Stoltz28-Feb-07 5:38 
GeneralRe: Thread Problem Pin
vibindia28-Feb-07 5:46
vibindia28-Feb-07 5:46 

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.