Loading ...
Sorry, an error occurred while loading the content.
 

Re: [c-prog] Re: changing characters

Expand Messages
  • Victor A. Wagner Jr.
    learning to program by experiment is hazardous (as you re finding out). further, you will learn things that work on YOUR compiler (because it s faulty) or
    Message 1 of 12 , May 27, 2004
      learning to program by experiment is hazardous (as you're finding out).
      further, you will learn things that work on YOUR compiler (because it's
      faulty) or things that _don't_ work on your compiler (because it's faulty)
      and make the assumption that this is the way things are supposed to be.
      I suggest as strongly as possible that you find a collection of _good_
      books and read through them and do _all_ of the exercises.

      I recommend the following books: read them in mostly the order listed
      "Accelerated C++" Andrew Koenig & Barbara Moo
      "The C++ Standard Library" Nicolai Josuttis --- a "must have"
      "Effective C++", "More Effective C++", "Effective STL" Scott Meyers
      "Exceptional C++", "More Exceptional C++" Herb Sutter
      "The C++ Programming Language" 3rd edition or later Bjarne Stroustrup
      "Modern C++ Design" Andrei Alexandrescu
      "C++ Templates" Vandevoorde & Josuttis
      "Standard C++ IOStreams and Locales" Langer & Kreft

      when you finish those, you will know more about C++ than most practitioners
      on the planet.

      At Thursday 2004-05-27 20:05, you wrote:
      >ok, i realize that, im saying i dunno the differense, and i have no
      >idea which i'm using at any time, so.. im just tryin to write
      >working programs i can use for myself :) i'm new so i need help, and
      >i know absolutly no-one personally even compitant enough to
      >understand the meaning of " if " in a program, of any language, java
      >script. java, C. C++, C#, lpc, lpcMud0s, or whatever.. So.. I use
      >this group, it being the MOST active group for C\C++, I do
      >appologize if i seem incompitant or just plane ignorant, or needy or
      >whatever, i scincerly do.. but its the only way ill learn without
      >having to pay anyone.
      >
      >
      >ps. sorry for writing so much, reading is boring.. i know.

      Victor A. Wagner Jr. http://rudbek.com
      The five most dangerous words in the English language:
      "There oughta be a law"
    • danken_35
      thanks, im just applying for my first real job, well, just about to start applying all over the place, mostly fast food resteraunts, but when i get the money,
      Message 2 of 12 , May 27, 2004
        thanks, im just applying for my first real job, well, just about to
        start applying all over the place, mostly fast food resteraunts, but
        when i get the money, ill definatly look those up, untill then, i
        think the trial and error is my best (well, i should say funnest)
        option, and some people might say, programming has nothing to do
        with fun.. then they shouldnt program if you dont like what you do,
        dont do it, and yes i realize some people have no choice, i dont
        wanna argue about that, but to me programming is fun, thats one of
        the main reasons i want to do it, eventually, for a living :) but i
        got a couple years to worry about that.. so i dont need to cram.

        but Thanks, ill definatly look up those books :)


        --- In c-prog@yahoogroups.com, "Victor A. Wagner Jr." <vawjr@r...>
        wrote:
        > learning to program by experiment is hazardous (as you're finding
        out).
        > further, you will learn things that work on YOUR compiler (because
        it's
        > faulty) or things that _don't_ work on your compiler (because it's
        faulty)
        > and make the assumption that this is the way things are supposed
        to be.
        > I suggest as strongly as possible that you find a collection of
        _good_
        > books and read through them and do _all_ of the exercises.
        >
        > I recommend the following books: read them in mostly the order
        listed
        > "Accelerated C++" Andrew Koenig & Barbara Moo
        > "The C++ Standard Library" Nicolai Josuttis --- a "must have"
        > "Effective C++", "More Effective C++", "Effective STL" Scott Meyers
        > "Exceptional C++", "More Exceptional C++" Herb Sutter
        > "The C++ Programming Language" 3rd edition or later Bjarne
        Stroustrup
        > "Modern C++ Design" Andrei Alexandrescu
        > "C++ Templates" Vandevoorde & Josuttis
        > "Standard C++ IOStreams and Locales" Langer & Kreft
        >
        > when you finish those, you will know more about C++ than most
        practitioners
        > on the planet.
        >
        > At Thursday 2004-05-27 20:05, you wrote:
        > >ok, i realize that, im saying i dunno the differense, and i have
        no
        > >idea which i'm using at any time, so.. im just tryin to write
        > >working programs i can use for myself :) i'm new so i need help,
        and
        > >i know absolutly no-one personally even compitant enough to
        > >understand the meaning of " if " in a program, of any language,
        java
        > >script. java, C. C++, C#, lpc, lpcMud0s, or whatever.. So.. I use
        > >this group, it being the MOST active group for C\C++, I do
        > >appologize if i seem incompitant or just plane ignorant, or needy
        or
        > >whatever, i scincerly do.. but its the only way ill learn without
        > >having to pay anyone.
        > >
        > >
        > >ps. sorry for writing so much, reading is boring.. i know.
        >
        > Victor A. Wagner Jr. http://rudbek.com
        > The five most dangerous words in the English language:
        > "There oughta be a law"
      • Victor A. Wagner Jr.
        Funnest is getting things to work. the books will help you do that quicker, more reliably, and with less headaches. if you don t have the money, check your
        Message 3 of 12 , May 27, 2004
          Funnest is getting things to work.
          the books will help you do that quicker, more reliably, and with less
          headaches.
          if you don't have the money, check your local libraries.

          At Thursday 2004-05-27 22:36, you wrote:
          >thanks, im just applying for my first real job, well, just about to
          >start applying all over the place, mostly fast food resteraunts, but
          >when i get the money, ill definatly look those up, untill then, i
          >think the trial and error is my best (well, i should say funnest)
          >option, and some people might say, programming has nothing to do
          >with fun.. then they shouldnt program if you dont like what you do,
          >dont do it, and yes i realize some people have no choice, i dont
          >wanna argue about that, but to me programming is fun, thats one of
          >the main reasons i want to do it, eventually, for a living :) but i
          >got a couple years to worry about that.. so i dont need to cram.
          >
          >but Thanks, ill definatly look up those books :)

          Victor A. Wagner Jr. http://rudbek.com
          The five most dangerous words in the English language:
          "There oughta be a law"
        • danken_35
          i m 16, i can get the money, and my moms to busy to drive me 6 miles to the nearest library, but theres a lot of fast food places near her work, so if i can
          Message 4 of 12 , May 27, 2004
            i'm 16, i can get the money, and my moms to busy to drive me 6 miles
            to the nearest library, but theres a lot of fast food places near
            her work, so if i can get a shift close to hers, she can drop me off
            and bring me home, ill get prolly only $250 a week, but those books
            cant cost more than 2 mionths work all together :) and by the way,
            im in ghetto old pensacola florida, where noone knows a darn thing
            about computers it seems, i'd be VERY surprised if the library had
            ANYTHING about programming in ANY language, even html, which is a
            markup language not a programming language. ;)




            --- In c-prog@yahoogroups.com, "Victor A. Wagner Jr." <vawjr@r...>
            wrote:
            > Funnest is getting things to work.
            > the books will help you do that quicker, more reliably, and with
            less
            > headaches.
            > if you don't have the money, check your local libraries.
            >
            > At Thursday 2004-05-27 22:36, you wrote:
            > >thanks, im just applying for my first real job, well, just about
            to
            > >start applying all over the place, mostly fast food resteraunts,
            but
            > >when i get the money, ill definatly look those up, untill then, i
            > >think the trial and error is my best (well, i should say funnest)
            > >option, and some people might say, programming has nothing to do
            > >with fun.. then they shouldnt program if you dont like what you
            do,
            > >dont do it, and yes i realize some people have no choice, i dont
            > >wanna argue about that, but to me programming is fun, thats one of
            > >the main reasons i want to do it, eventually, for a living :) but
            i
            > >got a couple years to worry about that.. so i dont need to cram.
            > >
            > >but Thanks, ill definatly look up those books :)
            >
            > Victor A. Wagner Jr. http://rudbek.com
            > The five most dangerous words in the English language:
            > "There oughta be a law"
          • Don Newell
            Howdy, I was stationed in Pensacola, Florida in the late 60s as a Marine, out at the Naval Air Station (helicopters). The local library is a part of an
            Message 5 of 12 , May 28, 2004
              Howdy,
              I was stationed in Pensacola, Florida in the late 60s
              as a Marine, out at the Naval Air Station (helicopters).
               
              The local library is a part of an inter-library group.
              If you can find what programming book you'd
              like to read, you can ask to have your local library
              loan it from another library. Usually you get a time
              loan of two to four weeks, and that time can be
              extended. Be sure to ask for any CDs that may come
              with a book.  You can also download code from
              a library computer for a book.
               
              Good luck!
              Don
              Please, Pray for Tina Lynn Hayden.
              ----- Original Message -----
              From: danken_35
              Sent: Friday, May 28, 2004 1:39 AM
              Subject: [c-prog] Re: changing characters

              i'm 16, i can get the money, and my moms to busy to drive me 6 miles
              to the nearest library, but theres a lot of fast food places near
              her work, so if i can get a shift close to hers, she can drop me off
              and bring me home, ill get prolly only $250 a week, but those books
              cant cost more than 2 mionths work all together :) and by the way,
              im in ghetto old pensacola florida, where noone knows a darn thing
              about computers it seems, i'd be VERY surprised if the library had
              ANYTHING about programming in ANY language, even html, which is a
              markup language not a programming language. ;)




              --- In c-prog@yahoogroups.com, "Victor A. Wagner Jr." <vawjr@r...>
              wrote:
              > Funnest is getting things to work.
              > the books will help you do that quicker, more reliably, and with
              less
              > headaches.
              > if you don't have the money, check your local libraries.
              >
              > At Thursday 2004-05-27 22:36, you wrote:
              > >thanks, im just applying for my first real job, well, just about
              to
              > >start applying all over the place, mostly fast food resteraunts,
              but
              > >when i get the money, ill definatly look those up, untill then, i
              > >think the trial and error is my best (well, i should say funnest)
              > >option, and some people might say, programming has nothing to do
              > >with fun.. then they shouldnt program if you dont like what you
              do,
              > >dont do it, and yes i realize some people have no choice, i dont
              > >wanna argue about that, but to me programming is fun, thats one of
              > >the main reasons i want to do it, eventually, for a living :) but
              i
              > >got a couple years to worry about that.. so i dont need to cram.
              > >
              > >but Thanks, ill definatly look up those books :)
              >
              > Victor A. Wagner Jr.      http://rudbek.com
              > The five most dangerous words in the English language:
              >                "There oughta be a law"



              To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe@yahoogroups.com>.


            • Barry Sperling
              Bruce Eckel has posted several free programming books on the net, including a Vol. 1 and Vol. 2 for C++ at: http://64.78.49.204/ I ve only glanced at them but
              Message 6 of 12 , May 28, 2004
                Bruce Eckel has posted several free programming books on the net,
                including a Vol. 1 and Vol. 2 for C++ at:
                http://64.78.49.204/
                I've only glanced at them but they seem to cover the topic, though if
                you are in a hurry to code you might have to skip ahead and then come
                back to read the theory.
                I taught myself programming by reading magazines and books in the 1970s
                and 80s and writing a lot of code. I enjoyed it as a hobby. After
                retiring I got a job as a programmer and, after 5 years, it is still
                fun. Good luck!
                Barry


                danken_35 wrote:
                > i'm 16, i can get the money, and my moms to busy to drive me 6 miles
                > to the nearest library, but theres a lot of fast food places near
                > her work, so if i can get a shift close to hers, she can drop me off
                > and bring me home, ill get prolly only $250 a week, but those books
                > cant cost more than 2 mionths work all together :) and by the way,
                > im in ghetto old pensacola florida, where noone knows a darn thing
                > about computers it seems, i'd be VERY surprised if the library had
                > ANYTHING about programming in ANY language, even html, which is a
                > markup language not a programming language. ;)
                >
                >
                >
                >
                > --- In c-prog@yahoogroups.com, "Victor A. Wagner Jr." <vawjr@r...>
                > wrote:
                >
                >>Funnest is getting things to work.
                >>the books will help you do that quicker, more reliably, and with
                >
                > less
                >
                >>headaches.
                >>if you don't have the money, check your local libraries.
                >>
                >>At Thursday 2004-05-27 22:36, you wrote:
                >>
                >>>thanks, im just applying for my first real job, well, just about
                >
                > to
                >
                >>>start applying all over the place, mostly fast food resteraunts,
                >
                > but
                >
                >>>when i get the money, ill definatly look those up, untill then, i
                >>>think the trial and error is my best (well, i should say funnest)
                >>>option, and some people might say, programming has nothing to do
                >>>with fun.. then they shouldnt program if you dont like what you
                >
                > do,
                >
                >>>dont do it, and yes i realize some people have no choice, i dont
                >>>wanna argue about that, but to me programming is fun, thats one of
                >>>the main reasons i want to do it, eventually, for a living :) but
                >
                > i
                >
                >>>got a couple years to worry about that.. so i dont need to cram.
                >>>
                >>>but Thanks, ill definatly look up those books :)
                >>
                >>Victor A. Wagner Jr. http://rudbek.com
                >>The five most dangerous words in the English language:
                >> "There oughta be a law"
                >
                >
                >
                >
                >
                > To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe@yahoogroups.com>.
                > Yahoo! Groups Links
                >
                >
                >
                >
                >
              • Shyan Lam
                Reply embedded... ... What do you meant by letters change to numbers ? Show and example of what you re trying to accomplish, as your codes didn t clearly
                Message 7 of 12 , May 28, 2004
                  Reply embedded...

                  > -----Original Message-----
                  > From: danken_35 [mailto:danken_35@...]
                  > Sent: Thursday, May 27, 2004 6:17 PM
                  > To: c-prog@yahoogroups.com
                  > Subject: [c-prog] changing charictors
                  >
                  > ok, im trying unsuccessfully to make a program where you type in
                  > stuff and the letters change to numbers, (that I specify) and im
                  > willing to type the code 26 times for each seperate letter, but i am
                  > not willing to put anyone else through that, an example of how to
                  > would help, i tried the code below and got all sorts of errors, i
                  > bet im not even close, but some help would be nice

                  What do you meant by "letters change to numbers"? Show and example of what
                  you're trying to accomplish, as your codes didn't clearly show that.

                  > #include <stdio.h>
                  > #include <string.h>
                  > #include <iostream.h>
                  ^^^^^^^^^^^^
                  Non-standard header. Should be <iostream> and you should read the usage of
                  namespace.

                  > int main ()
                  > {
                  > char str[1000];

                  If you're using C++, use std::string instead of char array.

                  > int bin[1000];
                  > cin >> str;

                  Don't mixed C and C++. They are two different languages that shared some
                  common syntax with different semantics (have different meanings or illegal
                  in one or the other). Mixing them is the worse way to learn. You'll be
                  totally confused, and so will we.

                  Enough said, here're some comments and clarification about your codes...

                  > if (str == "a"||str == "A"){
                  ^^^^^^^^^^
                  In C/C++, the name of an array evaluates to the pointer of the first element
                  of the array. So 'str' is a convenient representation of '&str[0]'.

                  A string literal ("a" in your example) evaluates to a pointer pointed to
                  where the string literal is internally stored (except when it is used to
                  initialize an array).

                  The comparison above thus compares the address of the array 'str' and the
                  address of the string literal "a". Obviously, this is not what you intended
                  as you're interested in comparing the content. To accomplish this, you can
                  use the standard C runtime string library that comes with your compiler:

                  #include <string.h>
                  ....
                  if ((strcmp(str, "a") == 0) ||
                  (strcmp(str, "A") == 0))

                  Read the documentation of 'strcmp'.

                  But if you're only checking the first character, you can simply:

                  if (str[0] == 'a' || str[0] == 'A')

                  Note the difference between "A" and 'A'. The two forms are very different.


                  > memset (bin," 01 ",1);

                  This is not how memset should be used. Read the documentation. What are
                  you trying to accomplish here and in the next statement.

                  > memset (str,bin,1);
                  > }
                  > puts (str);
                  > return 0;
                  > }

                  If you want to learn how to program, you have to learn to make it a habit to
                  read the documentation that comes with your compiler. If after reading,
                  there are things you don't understand, see if you can find more information
                  in books. If you still have doubts, post your questions here. Include what
                  you have already understand so we know where you stand.

                  HTH
                  Shyan
                Your message has been successfully submitted and would be delivered to recipients shortly.