• Lucid Dreaming - Dream Views




    Page 2 of 2 FirstFirst 1 2
    Results 26 to 37 of 37
    1. #26
      Member Kaniaz's Avatar
      Join Date
      Jan 2004
      Gender
      Location
      England
      Posts
      5,441
      Likes
      9
      Yes. If you use anything other than std::string, you're a whore. One that probably leaks a lot of memory. It's worth mentioning the OS will clear up your memory leak 99.9% of the time when your program terminates, but if your program hangs around for any longish period of time that will soon become a problem because the OS won't clear the heap until you terminate. And, of course, if you're using magic kinds of memory - shared memory, or you happen to be coding an OS, you're largely fucked.

    2. #27
      Your cat ate my baby Pyrofan1's Avatar
      Join Date
      Nov 2006
      Gender
      Posts
      720
      Likes
      3
      Some dodgy C++ knowledge here.
      [/b]
      Sorry, it's been a while since I've used &

    3. #28
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      Ok, Kaniaz
      proper question

      In your opinion, what's the best way to incorporate 3rd party modules into a program?

      take the boost libraries, for example
      I want to use some of them

      Dynamically linked (shared objects), or statically linked to my main program?

      I'm thinking:

      Dynamic

      + easy to update library's (bug fixes, etc.) without recompiling my project
      - DLL Hell (or SO hell, depending....)

      Static

      + easy for me, as I know in advance all interfaces to 3rd party components
      - have to re-compile entire project if one 3rd party component is updated
      (\_ _/)
      (='.'=)
      (")_(")

    4. #29
      Member Kaniaz's Avatar
      Join Date
      Jan 2004
      Gender
      Location
      England
      Posts
      5,441
      Likes
      9
      My opinion? Probably dynamic, unless your application just so happens to be so terribly suited to static linking for some reason. But this is just out of what seems to be a general convention more than any compelling reason otherwise and I trust you not to take my word as some sort of gospel (duh). I'm going more with instinct than any facts and figures that make either way compelling.

      Good old hell with those DLLs is one of the major problems with dynamic linking and something you want to avoid (who wouldn't?), but what with things like Microsoft's 'side-by-side' facilities, a bit of common sense and perhaps a teeny tiny bit of luck you shouldn't really have a problem with that. At least, not in this day and age. You'd think.

      If I remember correctly Boost is a bunch of C++ utilities and "things" that just make your life easier. Something like that I might just statically link for speed/"so I know it works", and because it might not inflate the .exe as much as say, statically linking all of DirectX in.

      Do you like answers that are basically 'maybe'? To be honest your linking method is probably rather inconsequential.

    5. #30
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      Quote Originally Posted by Kaniaz View Post
      If I remember correctly Boost is a bunch of C++ utilities and "things" that just make your life easier. Something like that I might just statically link for speed/"so I know it works", and because it might not inflate the .exe as much as say, statically linking all of DirectX in.[/b]
      yeah,
      like the boost regex library
      it's just a portable class that gives you regular expression functionality
      it's internal to my program only (ie. it doesn't communicate with anything outside)
      so I'm inclined to statically link it

      but something like database API's
      dynamic

      ok, thanks
      (\_ _/)
      (='.'=)
      (")_(")

    6. #31
      Party Pooper Tsen's Avatar
      Join Date
      Feb 2004
      LD Count
      ~1 Bajillion.
      Gender
      Posts
      2,530
      Likes
      3
      I've got a question.
      This is less about the programming itself and more about the actual programming process, but here goes:
      I'm just getting into C++. I'm still on the basics, but I'm learning quickly, and in a while I'm going to want to get my hands dirty with some experience.
      What would you recommend as a good starting point for some actual work for somebody new to C++?
      I've looked at possibly joining some open source projects and working on patching problems, would that be a good starting point, or not?
      [23:17:23] <+Kaniaz> "You think I want to look like Leo Volont? Don't you dare"

    7. #32
      Member
      Join Date
      Feb 2007
      Posts
      167
      Likes
      1
      Quote Originally Posted by Kaniaz View Post
      Code:
      void foo&#40;int *bar&#41;
      {
      bar=45;
      }
      [/b]
      Wouldn&#39;t that be:
      Code:
      void foo&#40;int *bar&#41;
      {
      &#40;*bar&#41;=45;
      }
      so as to change the value of the int instead of changing the pointer&#39;s target?

      I learned Hypercard first, then VB, then C++, and now I use Java. Hypercard isn&#39;t quite a programming language, but I count it because it&#39;s what got me interested. The great thing about Hypercard is that some of the commands are grammatically correct.
      Ten years without a dream, now starting almost from scratch.

      We&#39;re messing with our bodies on a very low level here - can we break them? What will it take to hurt ourselves?

      A little nonsense now and then is relished by the wisest men.
      -Roald Dahl

    8. #33
      Member Kaniaz's Avatar
      Join Date
      Jan 2004
      Gender
      Location
      England
      Posts
      5,441
      Likes
      9
      so as to change the value of the int instead of changing the pointer&#39;s target?[/b]
      You know, I think you&#39;re right. How&#39;s that for irony? Thanks for pointing it out.

      What would you recommend as a good starting point for some actual work for somebody new to C++?
      I&#39;ve looked at possibly joining some open source projects and working on patching problems, would that be a good starting point, or not?[/b]
      Myself, I spend a lot of time mucking around and making me own program - although it doesn&#39;t really have much use other than as a learning experience. I would reccomend you took a look at a project similar to one you&#39;d like to try making, so when you do get stuck, you can see how "other people" do it.

    9. #34
      Member 13redfan's Avatar
      Join Date
      Oct 2006
      LD Count
      2
      Gender
      Location
      Cape Town
      Posts
      387
      Likes
      1
      At college, I started with C++ and then went on to Java. My C++ knowledge isn&#39;t the greatest (in fact for a programmer I&#39;m not the most knowleadgeable about computers&#33; lol) but I&#39;ve done the basics.

      I want to create windows apps, I enjoy C++ but I found that Java has a much friendlier way of doing things with Swing. Even so, where would I get tutorials to do that stuff in C++? Or should I just use visual C++?

      I also want to, at some point, do some coding with openGL and stuff for games. Where would I get my hands on some tutorials and easy to follow books?
      Read my writing at: [link to merchandise removed],[link to merchandise removed]

      When once you have tasted flight,
      You will forever walk the earth with your eyes turned skyward,
      For there you have been,
      And there you will always long to return


    10. #35
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      Quote Originally Posted by 13redfan View Post
      I also want to, at some point, do some coding with openGL and stuff for games. Where would I get my hands on some tutorials and easy to follow books?[/b]
      This site has a lot of good tutorials
      http://www.cprogramming.com

      Main tutorials list
      http://www.cprogramming.com/tutorial.html

      (\_ _/)
      (='.'=)
      (")_(")

    11. #36
      Member 13redfan's Avatar
      Join Date
      Oct 2006
      LD Count
      2
      Gender
      Location
      Cape Town
      Posts
      387
      Likes
      1
      awesome&#33; thanks man
      Read my writing at: [link to merchandise removed],[link to merchandise removed]

      When once you have tasted flight,
      You will forever walk the earth with your eyes turned skyward,
      For there you have been,
      And there you will always long to return


    12. #37
      Your cat ate my baby Pyrofan1's Avatar
      Join Date
      Nov 2006
      Gender
      Posts
      720
      Likes
      3
      this site is all about openGL, http://nehe.gamedev.net/

    Page 2 of 2 FirstFirst 1 2

    Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •