RE: [Dev-C++] Question about structs...
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Rob P. <py...@ea...> - 2002-10-23 18:31:00
|
At 05:07 PM 10/23/02 +0200, Per Westermark wrote: >Well, Rob's original code snippet was strict C, so any use of templates >and classes might be outside the scope :-) For this project, I would like to keep it as close to ANSI C as possible because I know more about C than C++ and I will be attempting to port it for use on a Mac as well. >Template-based code with multiple sort orders normally requires a >smart-pointer implementation, which isn't trivial. Since I am fairly new at this, I would like to keep it as simple as possible. Maybe after I get more experience I will improve on what I already have working. As it is, I already have a challenge ahead of me determining how to talk directly to my custom hardware via the serial port in NT. (Mac is easy by comparison - a couple of calls to the Pascal-based toolbox.) >So in this case, a truly general application should probably store the >data in a MySQL database instead, but such a solution is clearly out of >scope of the original question... If I knew how to interface my program with MySQL, I would certainly do it. Unfortunately, the only way I know how to interface with MySQL is via Apache for building web sites :) >/Per W >On Wed, 23 Oct 2002, Marc Heiligers wrote: >> Ultimately , I would prefer to use a CString class for name and other string >> type properties. Also use TCHAR instead of char, etc. etc. etc. CString >> classes generally have a copy constructor so the result of GetName() would >> not be able to change the value in the instance. Mark, I appreciate your detailed help. It is the attention to details, and the use of examples, that helps people learn and understand. Unfortunately, I am smart enough to realize that most everything you said went clear over my head :( Thank you very much for the assistance. Per, Once again you have given me something to think about with the MySQL. As my C instructor once said, there are almost as many ways of doing something as their are programmers and who is to say who has the 'most correct' way of solving the problem. Thanks again, --->Rob |