Click here to Skip to main content
15,927,699 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCall back function Pin
NicholasCougar24-Apr-02 19:42
NicholasCougar24-Apr-02 19:42 
GeneralRe: Call back function Pin
Tom Archer24-Apr-02 20:21
Tom Archer24-Apr-02 20:21 
GeneralRe: Call back function Pin
Christian Graus24-Apr-02 23:11
protectorChristian Graus24-Apr-02 23:11 
QuestionVideo Capture - Which one?? Pin
Sameer Maggon24-Apr-02 19:39
Sameer Maggon24-Apr-02 19:39 
AnswerRe: Video Capture - Which one?? Pin
Christian Graus24-Apr-02 21:42
protectorChristian Graus24-Apr-02 21:42 
Generalthe use of call back Pin
NicholasCougar24-Apr-02 19:07
NicholasCougar24-Apr-02 19:07 
GeneralClass Pin
SilverShalkin24-Apr-02 16:53
SilverShalkin24-Apr-02 16:53 
GeneralRe: Class Pin
Christian Graus24-Apr-02 17:21
protectorChristian Graus24-Apr-02 17:21 
SilverShalkin wrote:
Ok... Ive bean experimenting with classes "saying that i do not know anything (at all) about classes, its bean a confusing process"

I'm eating jelly beans right now - Harry Potter ones. Smile | :)

SilverShalkin wrote:
How do you use a class...

A class is an encapsulation of an idea. For example, a CString, a std::string, a std::vector, a CWnd are all classes, and they all encapsulate a concept. I'll pick on CString for the sake of the rest of this reply. CString is a collection of data members and functions that together give me a string as an object, and allow me to pass it around and operate on/with it.

SilverShalkin wrote:
why do you use them...

One major thing C++ has over C is that C++ does not turn a project into a million functions all visible to one another. A class is used so that publically an interface is provided to do what the class is designed for, and the messy details are hidden and dealt with by the class.

SilverShalkin wrote:
What does Publuc do...

It means when I go CString s; the function or variable in question can be called, for example, s.Format("%d", 6);

SilverShalkin wrote:
What does private do...

It means I can't call/access the method/variable. Typically this means a function does something internal, and variables are generally private so they can be exposed through methods that filter what a person is trying to set a value to, if they are allowed to at all.

SilverShalkin wrote:
Do classes require any header files?

A class consists of a header file, and optionally a cpp file ( because it can all go in the header ). If you're using precompiled headers ( and with VC you usually are ) then std.afx needs to be the first file included in the .cpp file, followed by the .h file. So if I have a class called MyClass, the first two lines in the .cpp file are likely to be

#include "stdafx.h"
#include "myclass.h"

SilverShalkin wrote:
my idealistic ideal is that i could use classes "which i think i read that they are, basically a single block of info that you make, that you can duplicate and use kindof however you want"

If it's a representation of a block of data, you should use a struct. The only difference is that a struct has public members by default, a class has private, but a struct says to me a block of data, a class says implimentation of an idea.

SilverShalkin wrote:
To make all the monsters in my text game "just to learn how to use the class function" and then just recal certain things from the class...

One possible design is that am onster has methods that move it, and make it do certain things. Then a monster is an object that knows how to behave.



Christian

The tragedy of cyberspace - that so much can travel so far, and yet mean so little.

And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
GeneralRe: Class Pin
Christian Graus24-Apr-02 17:53
protectorChristian Graus24-Apr-02 17:53 
GeneralRe: Class Pin
Jon Hulatt24-Apr-02 23:03
Jon Hulatt24-Apr-02 23:03 
GeneralRe: Class Pin
Christian Graus24-Apr-02 23:14
protectorChristian Graus24-Apr-02 23:14 
GeneralRe: Class Pin
Jon Hulatt24-Apr-02 23:25
Jon Hulatt24-Apr-02 23:25 
GeneralRe: Class Pin
Christian Graus24-Apr-02 23:28
protectorChristian Graus24-Apr-02 23:28 
GeneralRe: Class Pin
Jon Hulatt24-Apr-02 23:33
Jon Hulatt24-Apr-02 23:33 
GeneralRe: Class Pin
Christian Graus24-Apr-02 23:43
protectorChristian Graus24-Apr-02 23:43 
Generalthe response. Pin
SilverShalkin25-Apr-02 15:22
SilverShalkin25-Apr-02 15:22 
GeneralRe: the response. Pin
Christian Graus25-Apr-02 15:34
protectorChristian Graus25-Apr-02 15:34 
GeneralRe: the response. Pin
SilverShalkin25-Apr-02 15:44
SilverShalkin25-Apr-02 15:44 
GeneralRe: the response. Pin
Christian Graus25-Apr-02 16:01
protectorChristian Graus25-Apr-02 16:01 
GeneralRe: the response. Pin
25-Apr-02 16:12
suss25-Apr-02 16:12 
GeneralRe: the response. Pin
Brian Olej25-Apr-02 16:14
Brian Olej25-Apr-02 16:14 
GeneralRe: Class Pin
Ravi Bhavnani24-Apr-02 19:02
professionalRavi Bhavnani24-Apr-02 19:02 
GeneralClipboard Pin
24-Apr-02 16:52
suss24-Apr-02 16:52 
GeneralFrom Author : Clipboard Pin
24-Apr-02 16:59
suss24-Apr-02 16:59 
GeneralRe: From Author : Clipboard Pin
Nish Nishant24-Apr-02 17:57
sitebuilderNish Nishant24-Apr-02 17: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.