• Programming Is Like trying to Learn CW

    From Timesoarer@VERT/DRAC to All on Sun Dec 27 07:10:59 2015
    Interesting to read all the comments here about different languages. I remember the old
    programing days of BASIC.. If you didn't have any ROMS to plug in you tried to learn from
    the book. I've tried to learn CW I get too bored with it move on to something else.. It has to
    be something you like to stay interested. I don't think I could learn on my own. I took RPG
    in college shorlty after RPG has become obsolete.
    My question is do you have to be good at math to be a good programer?
    I have always liked Linux I would say I'm pretty good with config files. Doesn't make you a
    programer. Makes you above the average user. I can't beleive all the public source code
    available. I can't imagine all the time people spend typing that stuff in and as a everyday
    user of portage <gentoo source tree> I thank you for all the time. I compile source code
    about everyday. What is it about watching a compiler that is addictive verses gaming.
    Anyway Thanks to all the programers out there..

    ---
    þ Synchronet þ Draconian BBS - Boone, Iowa
  • From Nightfox@VERT/DIGDIST to Timesoarer on Sun Dec 27 22:06:43 2015
    Re: Programming Is Like trying to Learn CW
    By: Timesoarer to All on Sat Dec 26 2015 23:10:59

    My question is do you have to be good at math to be a good programer?

    I don't think so (although it could help in some scenarios). I think it would be most important if you're writing software that deals with number crunching with mathematical formulas, etc.. Otherwise, I think most of the math you'd need is fairly simple stuff. For instance, you often have to think about things like array indexes to get information from an array or sometimes splice information into an array. One common scenario for that is string parsing (for instance, parsing command-line options).

    I think much of programming is being able to learn the various programming languages and programming libraries and having creative insight to figure out how to use them to do what you want in terms of software. And what you want to do with software could be any number of things, sometimes requiring heavy math but sometimes not.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Jon Justvig@VERT/STEPPING to Timesoarer on Mon Dec 28 22:18:58 2015
    Maybe you can help walk me through my errors with Open Watcom:

    Here's my first error:
    legion\scores.cpp(99): Error! E029: col(25) symbol 'getline' has not been declared

    for (i = 0; !ins.eof ( ) && i < 10; i++)
    {
    getline (ins, top_five[i].name, '#');
    ins >> top_five[i].score;
    eatwhite(ins);
    ins >> top_five[i].tnclass;
    eatwhite(ins);
    }

    I don't understand this one.

    ---
    þ Synchronet þ vintagebbsing.com:81
  • From Nightfox@VERT/DIGDIST to Jon Justvig on Mon Dec 28 22:40:37 2015
    Here's my first error:
    legion\scores.cpp(99): Error! E029: col(25) symbol 'getline' has not
    been
    declared

    for (i = 0; !ins.eof ( ) && i < 10; i++)
    {
    getline (ins, top_five[i].name, '#');
    ins >> top_five[i].score;
    eatwhite(ins);
    ins >> top_five[i].tnclass;
    eatwhite(ins);
    }

    I don't understand this one.

    It doesn't know about 'getline'. You can do either of the following:
    - Prefix that call with std:: - Example:
    std::getline(ins, top_five[i].name, '#');
    - After your #include lines, put "using std::getline;" (without the double- quotes)

    Also, be sure to #include <string>

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Jon Justvig@VERT/STEPPING to Nightfox on Tue Dec 29 02:22:00 2015
    Nightfox wrote to Jon Justvig <=-

    Here's my first error:
    legion\scores.cpp(99): Error! E029: col(25) symbol 'getline' has not
    been
    declared

    for (i = 0; !ins.eof ( ) && i < 10; i++)
    {
    getline (ins, top_five[i].name, '#');
    ins >> top_five[i].score;
    eatwhite(ins);
    ins >> top_five[i].tnclass;
    eatwhite(ins);
    }

    It doesn't know about 'getline'. You can do either of the following:
    - Prefix that call with std:: - Example:
    std::getline(ins, top_five[i].name, '#');
    - After your #include lines, put "using std::getline;" (without the double- quotes)

    This is for the first idea:

    leg034.cpp(42): Error! E921: col(18) namespace 'std' not allowed in using-declaration
    leg034.cpp(42): Error! E006: col(11) syntax error; probable cause: missing ';'

    still with this error:

    scores.cpp(99): Error! E029: col(25) symbol 'getline' has not been declared

    I added the second one and I get this error.

    leg034.cpp(42): Error! E926: col(12) syntax error: 'std::getline' has not been declared as a member

    Also, be sure to #include <string>

    #include <string> is there up top.



    ... MultiMail, the new multi-platform, multi-format offline reader!
    --- MultiMail/Win32 v0.49
    þ Synchronet þ vintagebbsing.com:81
  • From Nightfox@VERT/DIGDIST to Jon Justvig on Tue Dec 29 05:19:59 2015
    Re: Programming Is Like tryin
    By: Jon Justvig to Nightfox on Mon Dec 28 2015 18:22:00

    This is for the first idea:

    leg034.cpp(42): Error! E921: col(18) namespace 'std' not allowed in using-declaration
    leg034.cpp(42): Error! E006: col(11) syntax error; probable cause: missing ';'

    Can you post the code that is generating those errors? It's difficult to help without seeing the code (what's at columns 18 and 11?). This is what it should look like (underneath your #includes and before your functions):
    using namespace std;

    It looks like the compiler knows about namespaces, so I'm not sure why std would not be allowed (unless perhaps it's an older compiler and its headers don't declare the standard library things in the std namespace).

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Jon Justvig@VERT/STEPPING to Nightfox on Tue Dec 29 18:51:17 2015
    Re: Programming Is Like tryin
    By: Jon Justvig to Nightfox on Mon Dec 28 2015 18:22:00

    Can you post the code that is generating those errors? It's difficult to help without seeing the code (what's at columns 18 and 11?). This is what it should look like (underneath your #includes and before your functions):
    using namespace std;

    Here's the function:

    -- snip --

    bool open_input_file (int& i)
    {
    ifstream ins;

    ins.open(SFILE);
    if (ins.fail( ))
    {
    // cerr << "Creating New Top 10 Scores..." << endl;
    ins.close();

    return false;
    }

    for (i = 0; !ins.eof ( ) && i < 10; i++)
    {
    std::getline (ins, top_five[i].name, '#');
    ins >> top_five[i].score;
    eatwhite(ins);
    ins >> top_five[i].tnclass;
    eatwhite(ins);
    } // end while

    ins.close ();

    return true;

    } // end open_input_file

    -- snip --

    It looks like the compiler knows about namespaces, so I'm not sure why std would not be allowed (unless perhaps it's an older compiler and its headers don't declare the standard library things in the std namespace).

    I'm using Watcom 1.9 at the moment. I've also tried DJGPP. I'm not sure what to do at this point. I was up all night hassling with this.

    ---
    þ Synchronet þ vintagebbsing.com:81
  • From Darkages@VERT to Timesoarer on Fri Nov 18 18:38:26 2016
    On 2015-12-26 10:10 PM, Timesoarer wrote:
    Interesting to read all the comments here about different languages. I remember the old
    programing days of BASIC.. If you didn't have any ROMS to plug in you tried to learn from
    the book. I've tried to learn CW I get too bored with it move on to something else.. It has to
    be something you like to stay interested. I don't think I could learn on my own. I took RPG
    in college shorlty after RPG has become obsolete.
    My question is do you have to be good at math to be a good programer? I have always liked Linux I would say I'm pretty good with config files. Doesn't make you a
    programer. Makes you above the average user. I can't beleive all the public source code
    available. I can't imagine all the time people spend typing that stuff in and as a everyday
    user of portage <gentoo source tree> I thank you for all the time. I compile source code
    about everyday. What is it about watching a compiler that is addictive verses gaming.
    Anyway Thanks to all the programers out there..

    ---
    � Synchronet � Draconian BBS - Boone, Iowa

    I would say you need basic maths. Like the four operators, + - / *.
    (Add, subtract, divide and multiply) but that's really all. The more
    math you do the better, it gets your brain working in different and
    wonderful ways which is never bad and can help in programming.

    Another nice thing in programming is abstraction. Gotta love it.

    ---
    þ Synchronet þ DarkAges BBS | darkagesbbs.com | 1:19/25 | Wayne, OK
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net