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

C / C++ / MFC

 
AnswerRe: how to use flash window Pin
MemLeak10-Jun-03 8:56
MemLeak10-Jun-03 8:56 
General[OT(sort of)] Beginning a Project Pin
cnleek410-Jun-03 8:06
cnleek410-Jun-03 8:06 
GeneralRe: [OT(sort of)] Beginning a Project Pin
David Crow10-Jun-03 8:34
David Crow10-Jun-03 8:34 
GeneralRe: [OT(sort of)] Beginning a Project Pin
cnleek410-Jun-03 8:45
cnleek410-Jun-03 8:45 
GeneralRe: [OT(sort of)] Beginning a Project Pin
basementman10-Jun-03 10:11
basementman10-Jun-03 10:11 
GeneralRe: [OT(sort of)] Beginning a Project Pin
Maximilien10-Jun-03 10:06
Maximilien10-Jun-03 10:06 
GeneralAdd push buttons to the CListCtrl Pin
Harendra10-Jun-03 7:42
Harendra10-Jun-03 7:42 
Generalcalling functions in another class Pin
johnstonsk10-Jun-03 7:34
johnstonsk10-Jun-03 7:34 
For some reason I get error when I try to call a funtion in another class/file.

Here is what I am doing:

I have written a program that accesses a PCI card and performs functions on that card.
Everything wroks fine when I call these functions from myMainFile.cpp

In that file I have included the pciFunctions.h

I need a class that calls these functions performs tasks on the data and returns the data to the myMainFile.cpp
I need to do this so that I can display the values in various widgets.

so I created a new header file and created a class.

#ifndef rfmAccess_H
#define rfmAccess_H

#include pciFunctions
//other standard includes

class RFMAccess{

private:

public:
RFMAccess(){}
int openCard(char *devPath); //this is the function prototype
};
#endif

*************In myMainFile.cpp***************

#include "rfmAccess.h"

//I created a pointer to the class
RFMAccess *RFMAccess;


Then I call the function.

TmyMainFileForm1::Action1Execute(TObject *Sender){

RFMAccess::openCard("////.//RFM1");
or
RFMAccess.openCard("////.//RFM1");
or
RFMAccess->openCard("////.//RFM1");
}

Should I create the function in the rfmAccess.h or should I create another *.cpp file and do it in there?

Do I have to create a prototype or can I just finish the function in the rfmAccess.h file

Am I doing this right?

Am I calling the function correctly?


Sorry for so many questions, but I need alittle help. Smile | :) Smile | :) Smile | :)

Thanks,
steven
GeneralRe: calling functions in another class Pin
Dean Goodman10-Jun-03 8:23
Dean Goodman10-Jun-03 8:23 
GeneralRe: calling functions in another class Pin
johnstonsk10-Jun-03 9:57
johnstonsk10-Jun-03 9:57 
GeneralRe: calling functions in another class Pin
Dean Goodman10-Jun-03 12:08
Dean Goodman10-Jun-03 12:08 
GeneralRe: calling functions in another class Pin
johnstonsk10-Jun-03 17:19
johnstonsk10-Jun-03 17:19 
GeneralWindows Message Pin
Nick Parker10-Jun-03 6:43
protectorNick Parker10-Jun-03 6:43 
GeneralRe: Windows Message Pin
Miszou10-Jun-03 7:33
Miszou10-Jun-03 7:33 
GeneralRe: Windows Message Pin
Nick Parker10-Jun-03 7:44
protectorNick Parker10-Jun-03 7:44 
GeneralRe: Windows Message Pin
basementman10-Jun-03 8:33
basementman10-Jun-03 8:33 
GeneralCView And CSpliterWnd Pin
MinhHai10-Jun-03 5:44
MinhHai10-Jun-03 5:44 
GeneralRe: CView And CSpliterWnd Pin
valikac10-Jun-03 6:45
valikac10-Jun-03 6:45 
GeneralShipping .h files for .DLL classes Pin
Theopulus10-Jun-03 5:16
Theopulus10-Jun-03 5:16 
GeneralRe: Shipping .h files for .DLL classes Pin
Nemanja Trifunovic10-Jun-03 6:07
Nemanja Trifunovic10-Jun-03 6:07 
GeneralRe: Shipping .h files for .DLL classes Pin
Peter Weyzen10-Jun-03 20:21
Peter Weyzen10-Jun-03 20:21 
GeneralMix casing a name field Pin
Bryster10-Jun-03 4:13
Bryster10-Jun-03 4:13 
GeneralRe: Layered window problem Pin
Bedas10-Jun-03 4:11
Bedas10-Jun-03 4:11 
GeneralRe: Layered window problem Pin
Ryan Binns10-Jun-03 4:26
Ryan Binns10-Jun-03 4:26 
Questionhow to size an app to fit a PC's display size Pin
johnstonsk10-Jun-03 4:06
johnstonsk10-Jun-03 4:06 

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.