Click here to Skip to main content
15,923,219 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Delay of 250micro Sec Pin
Chris Losinger7-Jul-06 1:43
professionalChris Losinger7-Jul-06 1:43 
AnswerRe: Delay of 250micro Sec Pin
Rilhas9-Jul-06 2:30
Rilhas9-Jul-06 2:30 
QuestionMulticolumn listbox Pin
Amit Agarrwal7-Jul-06 1:30
Amit Agarrwal7-Jul-06 1:30 
AnswerRe: Multicolumn listbox /*modified*/ Pin
Hamid_RT7-Jul-06 1:34
Hamid_RT7-Jul-06 1:34 
GeneralRe: Multicolumn listbox /*modified*/ Pin
Amit Agarrwal7-Jul-06 2:18
Amit Agarrwal7-Jul-06 2:18 
GeneralRe: Multicolumn listbox Pin
Hamid_RT7-Jul-06 2:54
Hamid_RT7-Jul-06 2:54 
GeneralRe: Multicolumn listbox /*modified*/ Pin
David Crow7-Jul-06 2:56
David Crow7-Jul-06 2:56 
QuestionParallel Port acess & Reading Char strings to Labels / Lists [modified] Pin
markwalker847-Jul-06 1:21
markwalker847-Jul-06 1:21 
Hi there,

as you can see i'm new to these forums so go easy on me Smile | :)

I've been programming in C for a couple of years now and have recently moved onto C++. I am now undertaking a project to design control software for pipeline inspection tractors / vehicles where by i am now teaching my self Visual C++ (Using Microsoft Visual C++ 2005 express). Now i am far from an expert in C++, so VC++ is prooving to be rather difficult.

One thing i am trying to do is set a routine at the beginning of the programme to read a set of data from a collection of objects from a header file.


// tractor_types.h //

#include <string>

using namespace std;

class TRACTOR
{
public :
    char name[40];
    int bristles, pistons;

    TRACTOR();
    TRACTOR( char _name[40], int _bristles, int _pistons);
};

TRACTOR::TRACTOR (char _name[40], int _bristles, int_pistons)
{
strcopy(name, _name);
bristles = _bristles;
pistons  = _pistons ;
}

TRACTOR DPT_1("8 inch", 3, 2);
TRACTOR DPT_2("10 inch", 4, 3);




I am trying to set a routine to read the name value of each object into a combo list at the start of the programme (so that the tractor_types.h file can be quickly edited to add / remove / alter tractor properties).

I would also like to be able to display the chosen type of tractor in a label, but i keep getting errors telling me that the compiler is unable to convert char* to System::string... or something like that.



Finally... and my apologies for such a long first post.

parallel port access in Visual C++... how? i have had the entire process working in C++ compiled with Dev, using inout32.dll but have been unable to port this across to the visual c++ standard.


Any help in this would be greatly appreciated!


Mark

-- modified at 7:59 Friday 7th July, 2006
Answer[OT] Re: Parallel Port acess & Reading Char strings to Labels / Lists Pin
David Crow7-Jul-06 2:59
David Crow7-Jul-06 2:59 
GeneralRe: [OT] Re: Parallel Port acess & Reading Char strings to Labels / Lists Pin
markwalker847-Jul-06 3:08
markwalker847-Jul-06 3:08 
AnswerRe: Parallel Port acess & Reading Char strings to Labels / Lists Pin
earl7-Jul-06 6:20
earl7-Jul-06 6:20 
GeneralRe: Parallel Port acess & Reading Char strings to Labels / Lists Pin
markwalker849-Jul-06 22:48
markwalker849-Jul-06 22:48 
GeneralRe: Parallel Port acess & Reading Char strings to Labels / Lists Pin
earl10-Jul-06 9:26
earl10-Jul-06 9:26 
Questionwallpaper on dialog box Pin
ashish dogra7-Jul-06 1:18
ashish dogra7-Jul-06 1:18 
AnswerRe: wallpaper on dialog box /*modified*/ Pin
Hamid_RT7-Jul-06 1:31
Hamid_RT7-Jul-06 1:31 
GeneralRe: wallpaper on dialog box /*modified*/ Pin
ashish dogra7-Jul-06 1:42
ashish dogra7-Jul-06 1:42 
GeneralRe: wallpaper on dialog box Pin
Hamid_RT7-Jul-06 1:47
Hamid_RT7-Jul-06 1:47 
GeneralRe: wallpaper on dialog box [modified] Pin
ashish dogra7-Jul-06 1:54
ashish dogra7-Jul-06 1:54 
GeneralRe: wallpaper on dialog box Pin
Hamid_RT7-Jul-06 3:02
Hamid_RT7-Jul-06 3:02 
GeneralRe: wallpaper on dialog box /*modified*/ Pin
David Crow7-Jul-06 3:01
David Crow7-Jul-06 3:01 
GeneralRe: wallpaper on dialog box /*modified*/ Pin
Hamid_RT7-Jul-06 3:19
Hamid_RT7-Jul-06 3:19 
GeneralRe: wallpaper on dialog box /*modified*/ Pin
ashish dogra7-Jul-06 3:25
ashish dogra7-Jul-06 3:25 
GeneralRe: wallpaper on dialog box /*modified*/ Pin
Hamid_RT7-Jul-06 3:38
Hamid_RT7-Jul-06 3:38 
Questionwarning message Pin
Lord_Vader7-Jul-06 1:16
Lord_Vader7-Jul-06 1:16 
AnswerRe: warning message Pin
Chris Losinger7-Jul-06 1:47
professionalChris Losinger7-Jul-06 1:47 

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.