Search:

Type: Posts; User: thomann061

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    1
    Views
    1,338

    Turtle Trouble

    The Logo language, made the concept of turtle graphics famous. It was a mechanical turtle that walked around and drew shapes. The turtle holds a pen in one of two positions, up or down. While the...
  2. Thread: Linked List

    by thomann061
    Replies
    3
    Views
    738

    I finally figured out how to implement that....

    I finally figured out how to implement that. Thank you :)
  3. Thread: Linked List

    by thomann061
    Replies
    3
    Views
    738

    Linked List

    Background:

    I have to write a program that will read information from a file into a list and then display the list to the screen.

    I am given the templated class and templated functions that...
  4. Replies
    2
    Views
    844

    In the first set (A), I have the elements of 1 as...

    In the first set (A), I have the elements of 1 as the low, and 8 as the high.
    In the second set (B), I have the elements of 2 as the low, and 10 as the high.
    For the operator && code below, it...
  5. Replies
    2
    Views
    844

    Derived Class Templates

    Background:

    I have two templated classes, one derived from another. Both of them seperated out into header files and templated implementations. In my client_driver.cpp I am suppose to use the...
  6. Replies
    6
    Views
    1,240

    Okay, I understand. I will change them back.

    Okay, I understand. I will change them back.
  7. Replies
    6
    Views
    1,240

    New code: // arrayi.t #ifndef...

    New code:

    // arrayi.t



    #ifndef ARRAYI_H_
    #define ARRAYI_H_

    #include <iostream>
  8. Replies
    6
    Views
    1,240

    Thanks for the response. There's something in...

    Thanks for the response.
    There's something in the class I have to change?
    Right now, I'm not sure as to what.
    Why could I name the operation anything I want; don't I have to use A1 to access a...
  9. Replies
    6
    Views
    1,240

    Class Templates

    Hello, I need help with templates. I have been very confused with calling them in the main(). I understand the general idea of templates and overloading functions, but actually doing it in c++ is...
  10. Replies
    1
    Views
    690

    Working with templates

    PROBLEM STATEMENT:

    Add a template to the arrayi.h class so that elements of the arrays can be integer, float or double. Also
    add a subtraction operator to the class.

    CODE:

    Get the...
  11. amazing, although i do not fully understand why.

    amazing, although i do not fully understand why.
  12. Selection Sort - Why does it sort only by descending or ascending, but not by value?

    This program is designed to allocate dynamic memory using pointers and sort them ascending and descending. The problem is it will not sort the pointers by value. For example if I enter -1 2 3 -6 8. ...
  13. void countChars(ifstream& input, string...

    void countChars(ifstream& input, string storeCharacters[], ofstream& output)
    {

    int i = 0;
    string line;
    while( !input.eof() )
    {
    ...
  14. I will take note of that.

    I will take note of that.
  15. #include #include...

    #include<iostream>
    #include<fstream>
    #include<iomanip>
    #include<string>
    #include<cstdlib>
     
    usingnamespace std;
     
    void getFileName(ifstream& input) //gets filename
    {
  16. It is counting the words fine.

    It is counting the words fine.
  17. #include #include...

    #include<iostream>
    #include<fstream>
    #include<iomanip>
    #include<string>
    #include<cstdlib>
     
    usingnamespace std;
     
    void getFileName(ifstream& input)
    {
  18. The program runs fine, but it is not showing the...

    The program runs fine, but it is not showing the characters being stored when I output them.
  19. void countChars(ifstream& input, string...

    void countChars(ifstream& input, string storeCharacters[])
    {
    int i = 0;
    int counter = 1;
    for( i=0; i<counter; i++ )
    {
    getline(storeCharacters[i], input);
    counter++;
    if ( !input )
    counter--;
  20. So I still don't know how to read in the...

    So I still don't know how to read in the characters into an array.....
  21. Yes we have learned structs, and classes.

    Yes we have learned structs, and classes.
  22. You must use an array to store the information...

    You must use an array to store the information for each character.
    You must have these functions in your code: (you may have others but not necessary)

    getFileName – asks the user for the name...
  23. Well, I thought I could use an array to store all...

    Well, I thought I could use an array to store all the characters. If I used the getline() function to get each line individually, and then stored each line into an array.
  24. I included the string in case I did use it. I'm...

    I included the string in case I did use it. I'm not sure whether or not I need it.
  25. a string array will suffice. I think 20...

    a string array will suffice. I think 20 characters would cover the longest word.
Results 1 to 25 of 45
Page 1 of 2 1 2