Thread: Hey, I'm new here

  1. #1
    Registered User
    Join Date
    Jun 2008
    Location
    Houston, Texas
    Posts
    43

    Hey, I'm new here

    Just saying hi, my name's Shaun and 'm a 21 year old engineering student living in Houston Texas. I don't have much experience programming (they taught us Matlab and nothing else) and my job this summer requires me to learn C++, so I figured joining a forum would be a good idea. It's coming along pretty nicely, I've been going through a book word for word and I've written a few pretty decent little programs so far. My work will mainly deal with reading text files, separating by delimiters, and then breaking the strings into fragments for analysis. I think next on my agenda is to learn about these so called "hash tables"...

    I also love music, I've played guitar for about nine years now, I like cooking, and I'm a big MMA fan.

    That's pretty much it.

  2. #2
    Banal internet user
    Join Date
    Aug 2002
    Posts
    1,380
    Hey Shaun, always nice to see new people taking an interest in C/C++.

    BTW what's MMA?

  3. #3
    Registered User
    Join Date
    May 2008
    Posts
    12
    Mixed Martial Arts, I'm guessing.

  4. #4
    Registered User
    Join Date
    Jun 2008
    Location
    Houston, Texas
    Posts
    43
    Quote Originally Posted by azerej View Post
    Mixed Martial Arts, I'm guessing.
    Yup, UFC, WEC, PRIDE, all that stuff.

  5. #5
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    Hey I'm from the Houston area as well. Nice to have ya.

    All I can say is: if you are dealing with lots of string parsing, make sure to use C++ strings and not C strings
    My Website

    "Circular logic is good because it is."

  6. #6
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    If you are doing lots of parsing, get boost. That's all I can say.
    Eh, get boost anyway, no matter what you do - it has loads of useful stuff.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    learn about regular expressions that boost uses to be specific.

  8. #8
    Registered User
    Join Date
    Jun 2008
    Location
    Houston, Texas
    Posts
    43
    Boost, I will look into that.


    I wasn't sure if regular expressions would help with the parsing, so some opinions on this subject would be helpful.

    As far as I understand, regular expressions are great tools for finding specially formatted strings of text. However, in my project, I won't care what the string is exactly, just how long it is. I'll be breaking it up into one character strings, then two character strings, then 3 and so on up to 5.

    Would regular expressions be worth looking into further?

  9. #9
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Regular Expressions don't look at specific formats, they allow you to look for patterns in text (allowing you to delimit a string by characters, length, words, or anything you can think of.) If you have strings to break up if you know the specific length, then you probably won't need to, you can just capture a certain amount of characters from a stream and place that as a symbol in your program. But as opposed to programatically doing it in C++, boost regular expressions allow you to do it nearly all at once. significantly reducing code length, and impressing your new bosses.

  10. #10
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    They also allow you to split text into an array, and much much more. I don't think I know even half of what it can do.
    There's no harm in trying to learn it, however. By doing it, you can then determine if it's good for the job or not.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  11. #11
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    We had fun in my unix programming course doing regex using sed,grep,cat, and awk, writing several lines of code, only to be shown up by the professor with his two lines of horrendous regex patterns that do what several lines would do.

  12. #12
    Registered User
    Join Date
    Jun 2008
    Location
    Houston, Texas
    Posts
    43
    Quote Originally Posted by indigo0086 View Post
    Regular Expressions don't look at specific formats, they allow you to look for patterns in text (allowing you to delimit a string by characters, length, words, or anything you can think of.) If you have strings to break up if you know the specific length, then you probably won't need to, you can just capture a certain amount of characters from a stream and place that as a symbol in your program. But as opposed to programatically doing it in C++, boost regular expressions allow you to do it nearly all at once. significantly reducing code length, and impressing your new bosses.
    Yeah, sorry, still getting the jargon down. Patterns was what i meant, not formats.

    Everything else there looks promising though, I'll definitely look into it.

    Thanks!

  13. #13
    Registered User
    Join Date
    Jun 2008
    Location
    Houston, Texas
    Posts
    43
    Quote Originally Posted by Elysia View Post
    They also allow you to split text into an array, and much much more. I don't think I know even half of what it can do.
    There's no harm in trying to learn it, however. By doing it, you can then determine if it's good for the job or not.
    Naturally, and I'm sure I'd learn them one day whether I need them for this project or not. However, due to my lack of c++ experience, time is somewhat on short supply, so at least for this summer I need to streamline the amount that I learn.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I see.
    Well, maybe you should put it to side for now, then
    Regex can be very complex, and will probably require lots of time and practice to master.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Hey, need some quick help.
    By stehigs321 in forum C Programming
    Replies: 3
    Last Post: 10-06-2003, 01:02 PM
  2. Hey
    By REMY in forum C++ Programming
    Replies: 1
    Last Post: 01-22-2003, 11:06 PM
  3. hey moa news
    By harryP in forum C++ Programming
    Replies: 2
    Last Post: 09-10-2002, 06:59 PM
  4. Hey Rick! Check this out - all your base..
    By iain in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 01-10-2002, 02:36 AM