Search:

Type: Posts; User: Nurlana

Search: Search took 0.00 seconds.

  1. Replies
    6
    Views
    2,378

    OK, I changed the name of the function to "sort"....

    OK, I changed the name of the function to "sort". Now it gives me an error: a template declaration cannot appear at block scope. What I am missing now?
  2. Replies
    6
    Views
    2,378

    That's the full error message I received from...

    That's the full error message I received from teacher:
    sortIS.h: Does not compile:
    /tmp/ccuyaKo0.o: In function `main':
    driverIS.cpp:(.text+0x2c): undefined reference to `void ...
  3. Replies
    6
    Views
    2,378

    Standalone sort function for the class

    Hi, guys Could you please help with one more question? I need to write a standalone sort function, which will take a linked list parameter and sorts it. The function is included in the main list...
  4. Replies
    3
    Views
    1,152

    Thank you, I did sort this out. All I needed was...

    Thank you, I did sort this out. All I needed was the following:
    template<class T>
    void BST<T>::setTraverse (TravType node)
    {
    if(node!=NULL)
    {
    trav = node;
    }
    }
  5. Replies
    3
    Views
    1,152

    Set traversal in Binary Search Tree

    Hi, guys, need a little bit help with Binary Search Tree. I have to write a function for traversal through the binary tree in preorder, postorder or inorder. What I understood, this function should...
  6. Replies
    6
    Views
    1,104

    Well, at least you lived to your username. Did it...

    Well, at least you lived to your username. Did it make your day adding nasty note at the end? I didn't thought of this task, it is my homework I am trying to do. And it specifically asks to continue...
  7. Replies
    6
    Views
    1,104

    OK, I changed the code as follows: #include...

    OK, I changed the code as follows:


    #include <iostream>
    #include <iomanip>
    #include <string>


    using namespace std;
  8. Replies
    6
    Views
    1,104

    Problem with while loop

    Hi, guys. Need a bit of help. I have a program with try/catch block. It works fine till I press 'q' to quit program,...
  9. Replies
    3
    Views
    1,677

    The requirement is you ask the user what type of...

    The requirement is you ask the user what type of the circuit he wants and depending on choice (cin >> type (where type is either "series" or "parallel")) the program reads and calculates the required...
  10. Replies
    3
    Views
    1,677

    Reading from specific word in text file

    Need a help please. I need a program which reads from input file and then calculates total resistance and current. Circuit can be series or parallel. this is my input file:
    C1
    series
    3
    12
    5 8 12...
  11. Replies
    5
    Views
    1,210

    Thank you very much, Matticus. I will try fseek().

    Thank you very much, Matticus. I will try fseek().
  12. Replies
    5
    Views
    1,210

    Actually, I was in the class and I know what I...

    Actually, I was in the class and I know what I was taught. I know how to write a code using structs and classes. The instructions were not to use structs or classes here. If you don't understand my...
  13. Replies
    5
    Views
    1,210

    Reading from input file

    Hi guys, need a help. I have this program:


    #include <iostream>
    #include <iomanip>
    #include <string>
    #include <fstream>


    using namespace std;
  14. Replies
    3
    Views
    1,548

    Thank you, guys. It did help a lot! :)

    Thank you, guys. It did help a lot! :)
  15. Replies
    3
    Views
    1,548

    Classes and objects

    Need a help please. I have a program calculating average of students grades:



    #include <string>
    #include <iostream>
    #include <iomanip>
    #include <fstream>
  16. Replies
    12
    Views
    9,948

    Sorry, guys, I am really stuck. My brains will...

    Sorry, guys, I am really stuck. My brains will soon fry. the instructor said I need to use the following in the main:


    cout << setw[6] << "Value" << setw(12) << "Frequency" << endl;
    int v =...
  17. Replies
    12
    Views
    9,948

    I have already sorted the list. The function call...

    I have already sorted the list. The function call is already in the main.
    As for function description, I didn't show it here, because it was working fine.



    void sort(int list[], int size)
    {...
  18. Replies
    12
    Views
    9,948

    It would be good for this given array, but I need...

    It would be good for this given array, but I need a generic function, in case if I don't know if there will be repetitions or how many repetitions in the array.
  19. Replies
    12
    Views
    9,948

    Thank you for your advise, but I cannot use...

    Thank you for your advise, but I cannot use Classes here. Requirement is to use basic arrays and functions.
  20. Replies
    12
    Views
    9,948

    Sort and count frequency of array elements.

    I need a help please.
    I have to count the frequency of values in the array. I have this code:

    [/code]
    int main()
    {
    int size;
    int val, count;
    int list[] =...
Results 1 to 20 of 20