Search:

Type: Posts; User: cubimongoloid

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,398

    I have read some STL string. It's very helpful. ...

    I have read some STL string. It's very helpful.

    Thank you guys alot.
  2. Replies
    6
    Views
    1,398

    Thx for the tip, i did it. I know dynamic but not...

    Thx for the tip, i did it. I know dynamic but not much attention on that.


    int size = line.length();
    char *str;
    str = new char[size+1];
    strcpy(str, line.c_str());

    Thanks
  3. Replies
    6
    Views
    1,398

    Sorry, i'm new with c+ so i don't get it. I...

    Sorry, i'm new with c+ so i don't get it.

    I did try the size by string.size() and but into chr str[size] but it had error for initialize char str[]

    What should i do?
    Thx
  4. Replies
    6
    Views
    1,398

    convertion string to char ch[]

    #include <cstdlib>
    #include <iostream>
    #include <string>

    using namespace std;

    int main()
    {
    string line = "Today! I'm very-tired "; // if i do like this, the system will hault and...
  5. ive checked cout for w.getCount() it increased,...

    ive checked cout for w.getCount() it increased, but print out only 1


    string toString() const
    {
    stringstream ss;
    ss << " " << count << " | " << s;
    return ss.str();
    ...
  6. in class words i defined string and int for count...

    in class words i defined string and int for count


    class words
    {
    private:
    string s;
    int count;

    public:
  7. in the increment function: if find() increase...

    in the increment function: if find() increase else return NULL, is that what u meant?
  8. This is avl bintree. I am not allowed to use map,...

    This is avl bintree. I am not allowed to use map, because this app will be base on bintree. Many ppl also suggest me using map (much easier) but i cannot.


    #ifndef BINTREE_H_
    #define BINTREE_H_...
  9. bintree and count (not adding any template)?

    Hi all!
    sorry, title is using existing template.

    I wanna add words into a bintree with count with them. If the word is already existed it will increase 1.

    first my words class has 2 variable
    ...
  10. Replies
    31
    Views
    14,197

    I have inserted and printed out the bintree...

    I have inserted and printed out the bintree (automatically sorted)
    but there still one problem


    while (fin.good())

    {

    getline(fin, temp);
  11. Replies
    31
    Views
    14,197

    I did add the bintree insert outsite the loop....

    I did add the bintree insert outsite the loop. The numNodes() increase but i cannot get the display because: words w(new_word) is inside the loop.

    Btw, base on the code above the display go weird....
  12. Replies
    31
    Views
    14,197

    I did go to this far. I wanna implement istream...

    I did go to this far. I wanna implement istream and ostream to bintree but hvn't known yet.
    This is the code by far i have recognized the duplicate word in the tree. I wanna the istream and ostream...
  13. Replies
    31
    Views
    14,197

    I defined a vector for a word. so when the *itr...

    I defined a vector for a word. so when the *itr meet some special symbol, it will finish the vector for a word. For example: Today!. a vector for T o d a y, when *itr see symbol "!" it will terminate...
  14. Replies
    31
    Views
    14,197

    Thx alot. I will try it.

    Thx alot. I will try it.
  15. Replies
    31
    Views
    14,197

    i have try but still not know that to getline...

    i have try but still not know that to getline into istream. Most of the example is use cin for istream.
    So should i call the cin instead of getline. Because they are at 2 separate function.

    ...
  16. Replies
    31
    Views
    14,197

    Should we define in Words class the string and...

    Should we define in Words class the string and double for the decimal number. Because it also will be read (u can have a look back to the result). i read the book, it said cin on istream will be...
  17. Replies
    31
    Views
    14,197

    It seems to be stupid but how can i parsing...

    It seems to be stupid but how can i parsing delimiter inside operator>>

    stream >> word.s;
    and
    words w(temp);
    the app will read the line then put temp into istream OR istream do the part put...
  18. Replies
    31
    Views
    14,197

    yes. Just that. That is the template of bintree...

    yes. Just that. That is the template of bintree in the lecture which we may or maynot need to understand (hhaha...:D) but we can still write the code.

    This is the first subject about programming...
  19. Replies
    31
    Views
    14,197

    This is also help us to understand the bintree...

    This is also help us to understand the bintree and implement it into the assignment. which is i have to implement the bintree into my work. The app will read the file with multiple dilimiter in 1...
  20. Replies
    31
    Views
    14,197

    I understand what u said. The thing here is the...

    I understand what u said. The thing here is the lecturer provide bintree.h and binnode.h (his own work so you have to implement it in to your assignment. Because when submit, i can online submit 1...
  21. Replies
    31
    Views
    14,197

    I fixed them already, now they can read from...

    I fixed them already, now they can read from file, normal.

    This is base on bintree work with bintree.h is provided by lecturer. He's so tricky. And i'm not sure that can we used another method as...
  22. Replies
    31
    Views
    14,197

    That was quick. I'm just a beginner so to...

    That was quick. I'm just a beginner so to understand it i hv to take time. great work.

    The typedef map<> is in the library or user define. And i havent study map so, i barely understand it. In...
  23. Replies
    31
    Views
    14,197

    thx, im reading and thinking about them.

    thx, im reading and thinking about them.
  24. Replies
    31
    Views
    14,197

    As you can read the post above. there is a file...

    As you can read the post above. there is a file with mixing words and chars. The program will read the file, separate them follow the rules (which is show as result, so hard to explain)

    they will...
  25. Replies
    31
    Views
    14,197

    is it a vector of char??? because i confuse to...

    is it a vector of char???
    because i confuse to read by line or by char?
Results 1 to 25 of 32
Page 1 of 2 1 2