Search:

Type: Posts; User: r895

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    798

    Thanks everyone for your information. I will look...

    Thanks everyone for your information. I will look up header file.

    Thanks,
    R.
  2. Replies
    3
    Views
    798

    Structures and Functions

    I have been trying to find out the answner to a question I was given but no one I have talked to knows the answner. So hopefully some one on the post might know. The question is:

    In C++ there is a...
  3. Thread: Function Template

    by r895
    Replies
    32
    Views
    2,411

    Thanks Elkvis for your reply. For all your...

    Thanks Elkvis for your reply. For all your information I finally got the program to work!

    Thanks,
    R.
  4. Thread: Function Template

    by r895
    Replies
    32
    Views
    2,411

    Here is my current code: Thanks, R. ...

    Here is my current code:

    Thanks,
    R.



    #include <iostream>

    using namespace std;
  5. Thread: Function Template

    by r895
    Replies
    32
    Views
    2,411

    Thank you Elkvis for your quick reply. I change...

    Thank you Elkvis for your quick reply. I change the template like you showed by I still get the error: subscript is not of integral type at the total area of the function. If you have any further...
  6. Thread: Function Template

    by r895
    Replies
    32
    Views
    2,411

    Function Template

    I am trying to write a function template to receive an array of any type of data. The function should return the average of the first 3 elements of the array and the return value will be the same as...
  7. Thread: Try Catch

    by r895
    Replies
    4
    Views
    1,575

    Thanks everyone. I finally got my code to work. I...

    Thanks everyone. I finally got my code to work. I had the throw in the wrong area of the functions.
    Thanks,
    R.
  8. Thread: Try Catch

    by r895
    Replies
    4
    Views
    1,575

    Thank you Elkvis for your quick reply. I am not...

    Thank you Elkvis for your quick reply. I am not sure about the std:: exception and its derivatives are. All I have been shown is what I have in my code. If you can expand on what you are taking about...
  9. Thread: Try Catch

    by r895
    Replies
    4
    Views
    1,575

    Try Catch

    I am learning to use the Try Catch Throw but I am having a hard time getting all of the throws to work. I have to throw each of my functions with a string of Bad Major if a Major is 0. I can get...
  10. Replies
    8
    Views
    1,152

    I have to have some type of string in the...

    I have to have some type of string in the PrintData function. Something like: PrintData( "Average1 returned" , dAnswer);
    I put a loop in the function statement and it seem to work. Here is the...
  11. Replies
    8
    Views
    1,152

    When the PrintData function prints out the...

    When the PrintData function prints out the Average from the average function the number is printed out with a lower case L next to the average number. For example: l9.9 instead of 9.9.

    I have...
  12. Replies
    8
    Views
    1,152

    I think I got the program to work. This is what I...

    I think I got the program to work. This is what I have for the PrintData function:


    void PrintData(char sLabel[], double dAnswer)
    {

    cout << *sLabel << dAnswer << endl;
    }
  13. Replies
    8
    Views
    1,152

    Thanks Tim for a quick reply. If I change the 10...

    Thanks Tim for a quick reply. If I change the 10 to a constant the code stills does not run right. I think It hast to do with the char in the print function.

    R.
  14. Replies
    8
    Views
    1,152

    Program on Functions

    I hope someone can help me on an assignment I was given. I have asked around on other forums, but no one has an answer. I have to create a program with the following information:

    Create a program...
Results 1 to 14 of 14