Search:

Type: Posts; User: Mr_roboto

Search: Search took 0.00 seconds.

  1. Replies
    5
    Views
    1,330

    I thought that I defined it here. If I...

    I thought that I defined it here. If I untemplate the class it works.



    using namespace std;
    template<class T>
    class Test // <<-- I thoght that I declared the class "TEST" here
    { private:...
  2. Replies
    5
    Views
    1,330

    catch block giving parse error

    I can not seem to get my try/catch block to work.

    I am trying to use it in a templated class and I keep getting parse errors.

    Is my syntax correct?

    I have also tried


    template<class T>
  3. Replies
    7
    Views
    1,369

    First off. Thank your for your help and...

    First off. Thank your for your help and patience.

    I have updated my off lined functions with the syntax.


    void BankAccount<T>::Function()
    {~~Foo~~; }

    I am lost when it comes to scope.
  4. Replies
    7
    Views
    1,369

    I concede that templating the class is over kill,...

    I concede that templating the class is over kill, and a bit pointless, but I am trying to learn. Baby steps and all.

    I tried telmplating the functions as suggested, but still got errors. Here...
  5. Replies
    7
    Views
    1,369

    Class Templates and member functions

    Hello,

    I am trying to convert a regular class to a templated one.

    I thought this would be simple enough, but now I my functions do not compile.

    Where have I cone wrong?
  6. Replies
    8
    Views
    1,392

    I think I finally see the light. So if I...

    I think I finally see the light.

    So if I understand this



    Account<int> my_dollar_account;


    'int' is giving a type to the generic T that is being used in the functions.
  7. Replies
    8
    Views
    1,392

    OK. I think I understand. Is this a better...

    OK. I think I understand.

    Is this a better use of a template class. This way the user can enter an integer, float, double...



    template <class T>
    class Account
    { public:
    void...
  8. Replies
    8
    Views
    1,392

    In this case it looks like I am declaring a...

    In this case it looks like I am declaring a template class Foo and then trying to create an array of type Foo to hold names and ages.



    template<class T>
    class Foo
    { public:
    void...
  9. Replies
    8
    Views
    1,392

    class Template problems

    Hello,

    I am trying to wrap my head around class templates.

    I have an array but do not know how to implement with a template class.

    Before Template:


    class Foo
  10. Replies
    5
    Views
    1,098

    Syneris, Thank you for your help. Your note...

    Syneris,

    Thank you for your help.

    Your note about the console project reminded me that I was actually in a windows application project. Once I copied everything over to a console project...
  11. Replies
    5
    Views
    1,098

    Here we go

    Ok I think I understand what is going on but I still get

    " gcc: Compilation of header file requested
    gcc: file path prefix `C:\DEV-C_~1\Bin\' never used "

    errors when I try to compile.
    ...
  12. Replies
    5
    Views
    1,098

    Multiple file woes

    I am trying to use .h and .cpp file in a program that I working on. I can not seem to get it to work.

    Is this the correct format?

    This is my .h file



    //big.h
  13. Replies
    8
    Views
    9,176

    Thank you everyone. I appreciate the help. ...

    Thank you everyone.

    I appreciate the help.

    ~Rich
  14. Replies
    8
    Views
    9,176

    is there a better option to strlen()

    It is my understanding that 'strlen()' is recursive and is not the most efficient way to derive the length of a string. Would it be better to just use the maximum size of the string instead? Is...
  15. Replies
    24
    Views
    7,522

    Thank you

    Awsome tips guys.

    Thank you.
  16. Replies
    24
    Views
    7,522

    Library Function to verify Int

    I have a function that will only work with integers. Is there a library function that will check user input to make sure that the data entered is integers.

    [EDIT]
    Currently I am using a bool...
  17. Replies
    7
    Views
    1,248

    Thank you all

    I got it working :D

    Thank you all especially David and Tonto.

    ~Rich
  18. Replies
    7
    Views
    1,248

    Sometimes learning is an up hill battle ;) I...

    Sometimes learning is an up hill battle ;)

    I realize that I am trying to use the '==' operator in an uncommon way. I would like to over load the '==' operator so that I can use it in a search...
  19. Replies
    7
    Views
    1,248

    Code Re Post

    There is not that much to it. I am trying to learn things on a small scale first.

    I think that I implemented the the example in the fallowing code. Seeing how it will not compile I sure...
  20. Replies
    7
    Views
    1,248

    Operator overloading

    Hello,

    I am new to C++ and am trying to learn about operator overloading. I can not seem to wrap my mind around how it works. Could someone please point me in the right direction.





    ...
Results 1 to 20 of 20