Search:

Type: Posts; User: rippascal

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. your prototypes need to match the function...

    your prototypes need to match the function declarations here is what i would try

    double adding(double a, double b);
    or
    double adding(double,double);
    for the proto type



    double...
  2. Thread: stack debug

    by rippascal
    Replies
    3
    Views
    1,230

    I have the program working. It doesnt work when...

    I have the program working. It doesnt work when I use the extension .h but if i use the extension .cpp and change #ifndef and #define their is no problem. compare this code with that of my previous...
  3. Thread: stack debug

    by rippascal
    Replies
    3
    Views
    1,230

    I haven't learned about the built in stack class...

    I haven't learned about the built in stack class and prefer to step along with the book. By doing so I learn more about implementing a stack class.
  4. Thread: stack debug

    by rippascal
    Replies
    3
    Views
    1,230

    stack debug

    Could someone help me debug this. I am stumped.


    // Stack of customers prblm 3 pg 417 c++ primer plus
    #ifndef _STACKH_H_
    #define _STACKH_H_

    struct customer
    {
    char fullname[35];
  5. Replies
    3
    Views
    1,257

    struct in a class

    Yes that would be much easier it seems. I just thought I would leave the original structure intact in order to learn how to use the structure in the class. I'm book taught and the book hasn't...
  6. Replies
    3
    Views
    1,257

    Advice on Class with Stuct

    Hi,
    I'm converting this golf program into a prog using a class. I want to use the old structure in the class but am not sure how to use the structure or functions of the class. Here is what I...
  7. Thread: first class

    by rippascal
    Replies
    8
    Views
    2,575

    thnks again

    It's amazing how other people can spot your errors. So I assume if you set a default in the prototype you can not override this as I tryed to do. Thanks for all your help!!!
  8. Replies
    1
    Views
    969

    header file extensions

    I have several questions:
    <hat are the header file extensions for a c++ program using the borland compiler and the the compiler included with Dev-C++ ?
    What is a project in Dev-C++? Is it simply a...
  9. Thread: first class

    by rippascal
    Replies
    8
    Views
    2,575

    thnks one last error

    I decided to simplify things by including everything in one file for now. I have one last error in the program i con-t figure out.


    //bank account prblm #1 c++ primer plus
    #include <iostream>
    ...
  10. Thread: first class

    by rippascal
    Replies
    8
    Views
    2,575

    first class

    I am attempting to compile this file but do not understand even the first error. This is my first attempt at using a class in c++



    //bank account prblm #1 c++ primer plus
    #include <iostream>...
  11. Replies
    4
    Views
    963

    thanks

    thanks
    I noticed you didn't use the keyword private in your class declaration. Is this the default then?
  12. Replies
    4
    Views
    963

    member function

    What does it mean to have void as the parameter for the prototype of a member function ie

    void set(void);
  13. Replies
    1
    Views
    1,100

    I found the answer myself. right click on my...

    I found the answer myself.

    right click on my computer
    choose properties
    select the advance tab
    click on environmental variables
    select path from the system variables list
    click edit
  14. Replies
    10
    Views
    1,598

    create a function that uses the distance formula...

    create a function that uses the distance formula
    distance = sqrt(((x2-x1)*(x2-x1))+((y2-y1)*(y2-f1)))

    I think this is correct.
  15. Replies
    1
    Views
    1,100

    How to set the path WIN XP

    How do I set the default path in windows xp?
  16. Replies
    6
    Views
    1,129

    I belive the problem lies with the function type...

    I belive the problem lies with the function type not with the passing by refrence t &a. t should resolve to int or double array, but the return type may not resolve to an int or double value....
  17. Replies
    6
    Views
    1,129

    here are the errors i get using the code ...

    here are the errors i get using the code



    #include <iostream>
    using namespace std;

    // template , prototypes
    template <typename t>
    t max5(t ar[5]);
  18. Replies
    8
    Views
    1,453

    I think you are right conceptouallyw but neither...

    I think you are right conceptouallyw but neither way worked using cin or !cin hence my use of strlen
  19. Thread: Selftaught

    by rippascal
    Replies
    0
    Views
    898

    Selftaught

    To all those who have responded to my posts thank you. Have no fear I am not taking a course in c++ rather I am learning on my own with all your help and the book c++ primer plus.
  20. Replies
    6
    Views
    1,129

    replacing &ar with ar[5]

    I get a whole new set of errors replacing &t with ar[5]

    C:\Borland\BCC55\src>bcc32 temp.cpp
    Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    temp.cpp:
    Error E2094 temp.cpp 19:...
  21. Replies
    6
    Views
    1,129

    template woes

    Need some help with this template example
    on the prototype to the function I used the generic type from the template declaration t. Is this valid. C++ Primer Plus only used void as the return...
  22. Replies
    8
    Views
    1,453

    It will not compile as golf.h because it assumes...

    It will not compile as golf.h because it assumes the header file is a c file rather than a c++ file. There is prbly a special extension for c++ headers but cpp worked fine.

    According to c++...
  23. Replies
    8
    Views
    1,453

    main file

    Here is the main file


    #include <iostream>
    #include "golfh.cpp"
    using namespace std;



    int main()
  24. Replies
    8
    Views
    1,453

    header file

    Here is the header file with the struct and prototypes


    //golff.h for 8.3 pg 369 c++ primer plus
    const int Len=40;
    struct golf
    {
    char fullname[Len];
    int handicap;
    };
  25. Replies
    8
    Views
    1,453

    more debugging

    C:\Borland\BCC55\src>bcc32 golfh.cpp golfm.cpp golff.cpp
    Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    golfh.cpp:
    golfm.cpp:
    golff.cpp:
    Error E2277 golff.cpp 25: Lvalue required...
Results 1 to 25 of 52
Page 1 of 3 1 2 3