Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Seraphic78

    how to print address of a string.

    fee, You have been suggested appropriately. C++ prefers usage of string class. you can do something like this: string s = &quot;good&quot;; cout << &s << endl; hope this helps
  2. Seraphic78

    templates

    I guess that when you use a template, you generally define the methods in that header file itself. This is because the template instantiation will need the class declaration and definition. So it's better to put the template related things inside a single file and use that.
  3. Seraphic78

    static void function

    xwb gives you the appropriate answer in context of &quot;C&quot;. When you make your functions static,the notion is basically that you want this function to not to be shared across multiple files in the same compilation unit. It's just limited to a single file.
  4. Seraphic78

    multiple files program in C++

    As suggested by chipper, go for include guards. They will prevent the double inclusion of the those files. It's because once a header gets included, #define values are set true, so they aren't included the second time when they are looked for.
  5. Seraphic78

    downcasting with dynamic_cast

    You all had a very good discussion. But I would like to add up a few points here. Explicit upcasting isn't needed at all. YOu can do it implicitly. Say, Garage* pGarage = new Garage(); Room* pRoom = pGarage; // No dynamic_cast needed here. Moreover, Siblings won't be able to do the...

Part and Inventory Search

Back
Top