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

C / C++ / MFC

 
GeneralRe: help on making a app like ms excel structure Pin
Giles26-May-04 23:05
Giles26-May-04 23:05 
GeneralRe: help on making a app like ms excel structure Pin
Steve S26-May-04 23:20
Steve S26-May-04 23:20 
GeneralRe: help on making a app like ms excel structure Pin
mujun27-May-04 18:38
mujun27-May-04 18:38 
Generalho wto insert a BMP as a resource on form design Pin
Zeeshan Bilal26-May-04 22:08
Zeeshan Bilal26-May-04 22:08 
GeneralRe: ho wto insert a BMP as a resource on form design Pin
mirex26-May-04 22:42
mirex26-May-04 22:42 
GeneralRe: ho wto insert a BMP as a resource on form design Pin
Zeeshan Bilal27-May-04 2:35
Zeeshan Bilal27-May-04 2:35 
GeneralRe: ho wto insert a BMP as a resource on form design Pin
Anonymous28-May-04 7:28
Anonymous28-May-04 7:28 
Generaldvdplayer class and player class Pin
foxele26-May-04 21:45
foxele26-May-04 21:45 
hello, I wrote a player class and I also wrote a dvdplayer class that is supposed to inherit from player class(both are very simple, no GUI, just simulateion)

my question:
1. in dvdplayer what should I put as the type of disk tray and media reader, should I create a new class?

//dvdplayer.h

#ifndef DVDPLAYER_H
#define DVDPLAYER_H

#include "player.h"
#include <iostream.h>
#include "mystring.h"
#include "button.h"
#include "terminal.h"

class dvdplayer:public player
{
public:
dvdplayer(const char * info);
~dvdplayer();

virtual int play();
virtual int stop();
virtual int powerOn();
virtual int powerOff();

int videoConnect();
int audioConnect();
void insert();
void remove();

private:

terminal vedio_out;
terminal audio_out;
//disk_tray;
//media_reader;
};

#endif

2. Can somebody give me some suggestion on both player and dvdplayer class? I am a student who just start to learn C++, Thanks for your help!

//player.h

#ifndef PLAYER_H
#define PLAYER_H

#include "mystring.h"
#include "terminal.h"
#include "button.h"

class player
{
public:

Player(const char * info);
virtual ~player();

void getPlayerInfo();

//enum status {Playing, Paused, Stopped, Ejected, Open, Close, connected, disconnected);


void acConnect();
void setPlayerInfo();

//void acConnect();
void acDisconnect();

virtual int play() = 0;
virtual int stop() = 0;
virtual int powerOn() = 0;
virtual int powerOff() = 0;

protected:

button player;
button stop;
button power;
mystring PlayerInfo();
terminal AC;
};

#endif
_____________________________________

#include "player.h"

player::player(const char* info)
{
setPlayerInfo(info);
AC.setState(0); //set 0 to terminal ac denotes disconnect;
}
//constructor;

player::~player()
{
delete playerInfo;
delete polayer;
delete power;
delete stop;
delete AC;
}
//destructor;

void player::acConnect();
{
if(AC.getState == 0)
AC.setState(1);
else
cout<<"AC has already connected"<
GeneralVS.Net --&gt; VS.Net 2003: My working ISAPI Extension is now broken. Pin
mezla26-May-04 21:33
mezla26-May-04 21:33 
GeneralTrouble with CTreeCtrl Pin
arisrom26-May-04 21:11
arisrom26-May-04 21:11 
GeneralPrinting HTML Page Pin
senthil_kumar_project26-May-04 21:09
senthil_kumar_project26-May-04 21:09 
GeneralJSP Tag Insert Dynamically Pin
senthil_kumar_project26-May-04 20:21
senthil_kumar_project26-May-04 20:21 
GeneralDetecting Keyboard Pin
Ajay_Saraf26-May-04 18:58
Ajay_Saraf26-May-04 18:58 
GeneralRe: Detecting Keyboard Pin
cheesepirate27-May-04 0:45
cheesepirate27-May-04 0:45 
GeneralRe: Detecting Keyboard Pin
Ajay_Saraf28-May-04 21:59
Ajay_Saraf28-May-04 21:59 
GeneralRe: Detecting Keyboard Pin
Ajay_Saraf31-May-04 20:41
Ajay_Saraf31-May-04 20:41 
Questionhow to change visiblity of control from code? Pin
treetops26-May-04 18:14
treetops26-May-04 18:14 
AnswerRe: how to change visiblity of control from code? Pin
Ryan Binns26-May-04 18:36
Ryan Binns26-May-04 18:36 
GeneralReceiving from a socket Pin
monrobot1326-May-04 17:17
monrobot1326-May-04 17:17 
GeneralRe: Receiving from a socket Pin
Ryan Binns26-May-04 18:43
Ryan Binns26-May-04 18:43 
GeneralRe: Receiving from a socket Pin
bryce26-May-04 19:09
bryce26-May-04 19:09 
GeneralRe: Receiving from a socket Pin
Antony M Kancidrowski27-May-04 2:18
Antony M Kancidrowski27-May-04 2:18 
GeneralRe: Receiving from a socket Pin
monrobot1327-May-04 8:43
monrobot1327-May-04 8:43 
GeneralRe: Receiving from a socket Pin
Antony M Kancidrowski27-May-04 11:05
Antony M Kancidrowski27-May-04 11:05 
GeneralSQLBindParameter Problems...need helps!!!!! Pin
**bamboo**26-May-04 17:00
**bamboo**26-May-04 17:00 

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.