Re: New to C++, which IDE?

Discussion in 'C++' started by lbonafide@yahoo.com, Apr 7, 2008.

  1. Guest

    , Apr 7, 2008
    #1
    1. Advertising

  2. Guest

    On Apr 7, 3:08 pm, Pat <pkelecy@_REMOVETHIS_gmail.com> wrote:

    >
    > So does it really take 6 months to learn C++?


    Depends - I've been using it for years and am still learning things
    about it, and there are features I've never used. The process of
    learning C++ (or anything) is a continuum. I don't know where Cline/
    Lomow/Girou came up with the "6-12 months" number, which seems rather
    arbitrary to me. I would guess it depends on how new you are to
    programming, OO, how fast you learn, etc.

    Keep in mind you can be productive with and write good C++ programs in
    a lot shorter time than that, even if you don't know how to use
    everything.
    , Apr 7, 2008
    #2
    1. Advertising

  3. Guest

    On Apr 7, 1:08 pm, Pat <pkelecy@_REMOVETHIS_gmail.com> wrote:
    > wrote:


    [snip]

    > So does it really take 6 months to learn C++?


    I don't believe you've mentioned it explicitly and the assumption
    is that you
    are comfortable with the Object Oriented world.
    , Apr 7, 2008
    #3
  4. Pat wrote:
    > wrote:
    >> On Apr 7, 11:39 am, Pat <pkelecy@_REMOVETHIS_gmail.com> wrote:
    >>
    >> <snip>
    >>
    >> Can't recommend an IDE because I don't use one, but the FAQ below can
    >> point you to some book references.
    >>
    >> http://www.parashift.com/c -faq-lite/big-picture.html#faq-6.7

    >
    >
    > Thanks. Looks like there's a lot of useful information on that website.
    > I'll definitely check it out.
    >
    > So does it really take 6 months to learn C++?



    If you want to learn some simple stuff to make GUI applications, then it
    will not take long. If you want to learn the entire language you will
    need years.
    Ioannis Vranos, Apr 8, 2008
    #4
  5. Pat <pkelecy@_REMOVETHIS_gmail.com> wrote in
    news::

    >
    > I do have prior programming experience (BASIC, FORTRAN, and most
    > recently Matlab) but not with any object oriented language. So it may
    > be tougher going than I expect.


    You don't have to go crazy with OO, and in fact may not need it at all,
    depending on the problem. You can write plain old functions in C++. You
    may need to *use* classes in the standard library, but you don't
    necessarily need to create your own.

    Good luck.
    Lloyd Bonafide, Apr 8, 2008
    #5
  6. glen stark Guest

    On Mon, 07 Apr 2008 21:08:35 -0400, Pat wrote:

    > As I mentioned, I really only need to learn enough to create these C++
    > modules used by the commercial FEA code I use. I think these modules
    > are pretty basic (mostly calls to other functions I expect) so I'm
    > hoping I can come up to speed in a couple of weeks. I'll try to post
    > one though to get some opinions on that.
    >
    > I do have prior programming experience (BASIC, FORTRAN, and most
    > recently Matlab) but not with any object oriented language. So it may
    > be tougher going than I expect. I hope not (mainly because I'm pressed
    > for time) but I'm looking forward to the challenge.
    >
    > Thanks again for all the responses on this. I appreciate it.


    I came to C and then C++ from Matlab and Basic programming. I was doing
    something vaguely similar to you, in that I had to extend an existing code
    base.

    How long it takes you to get up to speed will depend heavily on how
    sophisticated the modules you need to extend are. I was able to be
    productive within a few weeks, by following a monkey-see monkey-do
    approach. Now, years later, I feel like I'm a pretty competent programmer.

    As for IDE's, well, I've used Borland and Visual Studios. I dislike
    Microsoft's design principles in general, but VS had some nice features.
    At the time I last used Borland's compiler it had woeful standards
    compliance, and I wouldn't have recommended it. That was long ago though,
    so who knows.

    Given the choice I use the GNU development suite: Emacs, make, gcc...
    There is a learning curve going in, but I find them elegant and efficient,
    I can use them on almost any OS, and I can legally use them for free at
    home. I find that as soon as I want to do anything that is slightly non-
    standard, they wind up being easier to use than the commercial IDE's. But
    I hate navigating menus, and greatly prefer the command line.
    glen stark, Apr 8, 2008
    #6
  7. A. Belli Guest

    Lloyd Bonafide schrieb:
    > Pat <pkelecy@_REMOVETHIS_gmail.com> wrote in
    > news::
    >
    >> I do have prior programming experience (BASIC, FORTRAN, and most
    >> recently Matlab) but not with any object oriented language. So it may
    >> be tougher going than I expect.

    >
    > You don't have to go crazy with OO, and in fact may not need it at all,
    > depending on the problem. You can write plain old functions in C++. You
    > may need to *use* classes in the standard library, but you don't
    > necessarily need to create your own.
    >
    > Good luck.


    Nevertheless you should try to learn what they are about and how they
    work. Often they can make (programers)life a lot easier.
    A. Belli, Apr 8, 2008
    #7
  8. A. Belli Guest

    Lloyd Bonafide schrieb:
    > Pat <pkelecy@_REMOVETHIS_gmail.com> wrote in
    > news::
    >
    >> I do have prior programming experience (BASIC, FORTRAN, and most
    >> recently Matlab) but not with any object oriented language. So it may
    >> be tougher going than I expect.

    >
    > You don't have to go crazy with OO, and in fact may not need it at all,
    > depending on the problem. You can write plain old functions in C++. You
    > may need to *use* classes in the standard library, but you don't
    > necessarily need to create your own.
    >
    > Good luck.



    Guess I hust hit the wrong button. Sorry!
    A. Belli, Apr 8, 2008
    #8
  9. Matthias Buelow, Apr 8, 2008
    #9
  10. asterisc Guest

    On Apr 9, 3:02 pm, Pat <pkelecy@_REMOVETHIS_gmail.com> wrote:
    > glen stark wrote:
    > > On Mon, 07 Apr 2008 21:08:35 -0400, Pat wrote:

    >
    > >> As I mentioned, I really only need to learn enough to create these C++
    > >> modules used by the commercial FEA code I use. I think these modules
    > >> are pretty basic (mostly calls to other functions I expect) so I'm
    > >> hoping I can come up to speed in a couple of weeks. I'll try to post
    > >> one though to get some opinions on that.

    >
    > >> I do have prior programming experience (BASIC, FORTRAN, and most
    > >> recently Matlab) but not with any object oriented language. So it may
    > >> be tougher going than I expect. I hope not (mainly because I'm pressed
    > >> for time) but I'm looking forward to the challenge.

    >
    > >> Thanks again for all the responses on this. I appreciate it.

    >
    > > I came to C and then C++ from Matlab and Basic programming. I was doing
    > > something vaguely similar to you, in that I had to extend an existing code
    > > base.

    >
    > > How long it takes you to get up to speed will depend heavily on how
    > > sophisticated the modules you need to extend are. I was able to be
    > > productive within a few weeks, by following a monkey-see monkey-do
    > > approach. Now, years later, I feel like I'm a pretty competent programmer.

    >
    > > As for IDE's, well, I've used Borland and Visual Studios. I dislike
    > > Microsoft's design principles in general, but VS had some nice features.
    > > At the time I last used Borland's compiler it had woeful standards
    > > compliance, and I wouldn't have recommended it. That was long ago though,
    > > so who knows.

    >
    > > Given the choice I use the GNU development suite: Emacs, make, gcc...
    > > There is a learning curve going in, but I find them elegant and efficient,
    > > I can use them on almost any OS, and I can legally use them for free at
    > > home. I find that as soon as I want to do anything that is slightly non-
    > > standard, they wind up being easier to use than the commercial IDE's. But
    > > I hate navigating menus, and greatly prefer the command line.

    >
    > Thanks for the feedback. I expect I'll be doing a lot of "monkey-see,
    > monkey-do" at the beginning also, although I would like to understand
    > what the code is doing. I've posted an example of what I'll need to
    > develop in another part of this this thread, but I've included a snippet
    > of it below. I can almost figure out what the different parts are doing
    > without knowing any C++. So I'm guessing this is not really that
    > complicated, as far as C++ code goes.
    >
    > As for IDE's, based on the feedback I gotten I think I'm going to start
    > with Visual Studio express and see how that does. If I run into
    > problems, then try one of the others.
    >
    > Thanks again for your comments. -Pat
    >
    > #include "UserDefinedPrimitiveDLLInclude.h"
    > #include <math.h>
    >
    > // User's own utility function prototypes
    > long CreateXYEdgeTool(struct UDPFunctionLib* functionLib, void*
    > callbackData, double* paramValues);
    > long CreateXZEdgeTool(struct UDPFunctionLib* functionLib, void*
    > callbackData, double* paramValues);
    > long CreateYZEdgeTool(struct UDPFunctionLib* functionLib, void*
    > callbackData, double* paramValues);
    > long CreateCylinder(struct UDPFunctionLib* functionLib, void*
    > callbackData, double* paramValues);
    >
    > static struct UDPPrimitiveTypeInfo primitiveInfo =
    > {
    > "Rounded_Cylinder",
    > "Create a Cylindrical Solid with Radius at Edges",
    > "Ansoft Corporation",
    > "03-29-2005",
    > "1.0"
    >
    > };
    >
    > extern "C" DLLEXPORT
    > struct UDPPrimitiveTypeInfo* GetPrimitiveTypeInfo()
    > {
    > return &primitiveInfo;
    >
    > }
    >
    > struct UDPPrimitiveParameterDefinition primParams[] =
    > {
    > {"Xpos", "X of Cylinder Base Center", kUDPLengthUnit, 0},
    > {"Ypos", "Y of Cylinder Base Center", kUDPLengthUnit, 0},
    > {"Zpos", "Z of Cylinder Base Center", kUDPLengthUnit, 0},
    > {"CylAxis", "Cyl Axis: X=0, Y=1, Z=2",kUDPNoUnit,2},
    > {"CylRad", "Radius of Cylindrical Solid",kUDPLengthUnit,6},
    > {"CylHt", "Height of Cylindrical Solid",kUDPLengthUnit,10},
    > {"Rad", "Radius of rounded edges", kUDPLengthUnit, 1},
    >
    > };
    >
    > static int numOfParameters = sizeof(primParams)/sizeof(primParams[0]);
    >
    > extern "C" DLLEXPORT
    > int GetPrimitiveParametersDefinition(struct
    > UDPPrimitiveParameterDefinition** paramDefinition)
    > {
    > *paramDefinition = primParams;
    > return numOfParameters;
    >
    > }
    >
    > extern "C" DLLEXPORT
    > char* GetLengthParameterUnits()
    > {
    > return "mm";
    >
    > }
    >
    > // Incase of error this function should return 0
    > extern "C" DLLEXPORT
    > int AreParameterValuesValid(char ** error, double* paramValues)
    > {
    > double radtest = paramValues[4];
    > int axistest = (int)paramValues[3];
    > double roundrad = paramValues[6];
    > double cylheight = paramValues[5];
    >
    > //rad better be positive
    >
    > if (radtest <= 0)
    > {
    > *error = "The cylinder must have positive radius.";
    > return 0;
    > }
    >
    > // Cyl Radius cannot drop below rounding radius
    >
    > if (radtest <= roundrad)
    > {
    > *error = "The cylinder radius must be larger than the edge
    > rounding radius.";
    > return 0;
    > }
    > // Cyl Height cannot drop below rounding radius
    >
    > if (cylheight <= 2*roundrad)
    > {
    > *error = "The cylinder height must be larger than twice the
    > rounding radius.";
    > return 0;
    > }
    >
    > //rounding radius can't be less than or equal to zero
    >
    > if (roundrad <= 0)
    > {
    > *error = "The rounded edge radius must be greater than zero.";
    > return 0;
    > }
    >
    > //reading comprehension, 101
    >
    > if ((axistest != 0) && (axistest != 1) && (axistest != 2))
    > {
    > *error = "Please define a valid axis designator: X=0, Y=1, Z=2";
    > return 0;
    > }
    > //no other rules. I'll allow height to be negative and work with
    > any start location
    > //by drawing at the origin and then translating required distance.
    >
    > return 1;
    >
    > }
    >
    > extern "C" DLLEXPORT
    > long CreatePrimitive(struct UDPFunctionLib* functionLib, void*
    > callbackData, double* paramValues)
    > {
    > //create some positions and vectors to help us for later
    >
    > double xs = paramValues[0];
    > double ys = paramValues[1];
    > double zs = paramValues[2];
    > int cylaxis = (int)paramValues[3];
    > double cylrad = paramValues[4];
    > double cylheight = paramValues[5];
    >
    > struct UDPVector transVec = {xs, ys, zs};
    >
    > //draw the cylinder
    >
    > long CylID = CreateCylinder(functionLib, callbackData, paramValues);
    >
    > //pick a subtraction tool function and use it. Also mirror part
    > along appropriate axis
    >
    > long PartOne; //placeholder declaration, will fill inside if
    > statements below
    > long PartTwo; //ditto
    > struct UDPVector normalX = {1, 0, 0};
    > struct UDPVector normalY = {0, 1, 0};
    > struct UDPVector normalZ = {0, 0, 1};
    > struct UDPPosition mirrorCtrX = {cylheight/2, 0, 0};
    > struct UDPPosition mirrorCtrY = {0, cylheight/2, 0};
    > struct UDPPosition mirrorCtrZ = {0, 0, cylheight/2};
    >
    > switch (cylaxis)
    > {
    > case 0:
    > PartOne = CreateYZEdgeTool(functionLib, callbackData,
    > paramValues);
    > PartTwo = functionLib->duplicateAndMirror(PartOne,
    > &mirrorCtrX, &normalX, callbackData);
    > if (PartOne==-1)
    > {
    > return -1;
    > }
    > break;
    > case 1:
    > PartOne = CreateXZEdgeTool(functionLib, callbackData,
    > paramValues);
    > PartTwo = functionLib->duplicateAndMirror(PartOne,
    > &mirrorCtrY, &normalY, callbackData);
    >
    > if (PartOne==-1)
    > {
    > return -1;
    > }
    > break;
    > case 2:
    > PartOne = CreateXYEdgeTool(functionLib, callbackData,
    > paramValues);
    > PartTwo = functionLib->duplicateAndMirror(PartOne,
    > &mirrorCtrZ, &normalZ, callbackData);
    >
    > if (PartOne==-1)
    > {
    > return -1;
    > }
    > break;
    > }
    > //group partnames for subtraction and subtract from cylinder
    >
    > long ToolIDs[2] = {PartOne, PartTwo};
    > long BlankIDs[1] = {CylID};
    >
    > long PrimSuccess = functionLib->subtract(BlankIDs, 1, ToolIDs, 2,
    > callbackData);
    >
    > //move cylinder to rightful location
    > long MoveIt = functionLib->translate(CylID, &transVec, callbackData);
    >
    > return CylID;
    >
    > }


    A good alternative is using Eclipse + CDT!
    asterisc, Apr 9, 2008
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jay
    Replies:
    9
    Views:
    402
    Oliver Wong
    Jul 11, 2006
  2. Replies:
    5
    Views:
    900
    Axel Straschil
    Apr 6, 2005
  3. Ilias Lazaridis
    Replies:
    6
    Views:
    454
    Ilias Lazaridis
    Jan 28, 2006
  4. Ioannis Vranos

    Re: New to C++, which IDE?

    Ioannis Vranos, Apr 9, 2008, in forum: C++
    Replies:
    3
    Views:
    269
    Jerry Coffin
    Apr 12, 2008
  5. Ilias Lazaridis
    Replies:
    13
    Views:
    225
    Ilias Lazaridis
    Apr 12, 2005
Loading...

Share This Page