Search:

Type: Posts; User: Ocifer

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    19
    Views
    4,349

    If you define/forward-declare it as a private...

    If you define/forward-declare it as a private member of the visible class, it should not be accessible through other parts of the hypothetical API / product that you are building. You might provide...
  2. Replies
    19
    Views
    4,349

    I also should add that I was able to answer one...

    I also should add that I was able to answer one of my own questions. If the class used for the implementation object is declared locally (that is within the visible class), then it is considered a...
  3. Replies
    19
    Views
    4,349

    Was not expecting all these replies. I will add...

    Was not expecting all these replies. I will add that I am learning about the PIMPL (compiler firewall) idiom to improve my knowledge of common practices. I've noticed a lot of Qt code that uses this...
  4. Replies
    19
    Views
    4,349

    Thank you both for the replies. First, to...

    Thank you both for the replies.

    First, to milli, I think the issue you came across is that std::unique_ptr causes problems if you don't declare a destructor. I forward declared the implementation...
  5. Replies
    19
    Views
    4,349

    Best place to forward declare PIMPL class?

    Hello,

    I'm just wondering what is considered to be the best practice with respect to a pimpl class. Just for context, with the PIMPL idiom, one often uses a pointer to an implementation class to...
  6. Replies
    8
    Views
    7,140

    The comments you've heard against mixing Visual...

    The comments you've heard against mixing Visual Studio with 3rd-party libraries likely stem from the commenters' confusion with setting up Visual Studio projects to use the libraries, or failed...
  7. Replies
    9
    Views
    1,568

    I was recently working on something that required...

    I was recently working on something that required a container of VERY non-POD data. I started off using the std::vector< T > container, but noticed a huge improvement in performance when I switched...
  8. I apologize in returning to this question so...

    I apologize in returning to this question so late. Thank you very much for your answers, they were helpful.
  9. General (noob) question about C++ and embedding programming

    Hello, I had a very general question, not a specific programming question. I've programmed in C++ before, and in assembly for the Motorola 68k in academic settings, if that helps answer.

    How much...
  10. Replies
    6
    Views
    901

    Thank you! That is making it easier to understand...

    Thank you! That is making it easier to understand the difference.
  11. Replies
    6
    Views
    901

    To clarify my question a bit more, std10093...

    To clarify my question a bit more, std10093 wrote:



    Is it the return keyword/construct that ensures this? What happens, in a logical step by step fashion? Is it something like

    1. foo...
  12. Replies
    6
    Views
    901

    Thank you for your replies. Perhaps I was not...

    Thank you for your replies. Perhaps I was not clear. I am trying to understand the conceptual difference behind the rules that C uses to deal with these memory allocations. To vart, in your example,...
  13. Replies
    6
    Views
    901

    Question about Stack vs. Heap allocation

    Hello, I've not programmed in C for a while, and I'm coming back to it. In attempting to use functions to allocate memory for a pointer, I've come across something I don't quite understand. This...
  14. Hello all, Thanks for the responses. I've...

    Hello all,

    Thanks for the responses. I've updated the source files, and they compile
    without any warnings or errors. I've attached them below in code tags.

    I would also like to make sure I...
  15. Relatively noob question regarding #include and .h files.

    Hello,

    It's been a while since I programmed, and I've gotten rusty on some of the main points. I've made a simple example to try to refresh my memory.

    Basically, I have the source files...
  16. Replies
    2
    Views
    681

    Passing a pointer to a function, say a pointer to...

    Passing a pointer to a function, say a pointer to an integer variable, allows you to change the value of the integer variable pointed to by that pointer.

    In your first code you posted, you were...
  17. Replies
    2
    Views
    1,060

    It's also (in my opinion) far nicer dealing with...

    It's also (in my opinion) far nicer dealing with string manipulation using the std::string and its functions. Love c++ for this. Once you get used the built in string functions (maybe methods is more...
  18. Replies
    16
    Views
    2,246

    Do not think of it as "making" something true....

    Do not think of it as "making" something true. Since we use Boolean expressions in programming to compare things so often, without changing the values themselves, you need to think of it more...
  19. Replies
    16
    Views
    2,246

    I've tutored students before in symbolic logic,...

    I've tutored students before in symbolic logic, and I can suggest googling links on "propositional logic" or "classical logic" first. There are many more names in use for the fundamental logic that...
  20. It might even be better to change the thread...

    It might even be better to change the thread title to "pass by pointer vs. pass by reference" or something, so that others can learn from my confusion. Mods? At heart, this had nothing to do with...
  21. No you understood. I am just tired and have...

    No you understood. I am just tired and have confused passing by reference and passing by pointers. Was able to find some good info on the net, thanks for the reply though. I had actually read about...
  22. Can someone please explain this fstream subtlety?

    Hi all,

    I've written programs before with file i/o in c++. There was one technique I learned for dealing with files and functions, and it seems to be standard (upon googling), but I was hoping...
  23. Thread: C++ functions

    by Ocifer
    Replies
    5
    Views
    2,025

    thadis_4 has the right idea. The compiler cannot...

    thadis_4 has the right idea. The compiler cannot read your mind. As far as it's concerned you've told it about some functions, and some variables (which happen to share the same name, by your...
  24. Replies
    11
    Views
    1,273

    I was trying to think if there were other...

    I was trying to think if there were other reasons, reduced compilation times also make a lot of sense. Good point.
  25. Replies
    11
    Views
    1,273

    Also, adding the :: becomes second nature pretty...

    Also, adding the :: becomes second nature pretty quickly. :: is also powerful, so don't just skip it because you don't want to type two extra colons.
Results 1 to 25 of 88
Page 1 of 4 1 2 3 4