CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: yellowMonkeyxx

Page 1 of 2 1 2

Search: Search took 0.04 seconds.

  1. Re: Sorting with upper/lowercase words and numbers

    Whenever I sort the contents in the file, I have the sorted numbers at the top, followed by the sorted uppercase words, and finally the sorted lowercase words. My main goal is to have all the sorted...
  2. Re: Sorting with upper/lowercase words and numbers

    The numbers should come first and it shouldn't matter if the word is either upper or lowercase. The sorting criteria I'm using consists of:
    heapsort
    quicksort
    *I will be writing the algorithm for...
  3. Sorting with upper/lowercase words and numbers

    I'm having an issue with sorting words, both upper and lowercase, and numbers in a file in ascending order that contain both upper and lower case words. For an example, words.txt file has contents...
  4. Generic heapsort question involving strings

    I'm writing a generic heapsort function that wil sort a group of words in ascending order. Here's what I'm confused about:


    Build longer strings from the input strings as you read them, e.g.,...
  5. Re: creating an iterator to search a vector of list

    If you're talking about "->" I already fixed that unless you are referring to something else?
  6. Re: creating an iterator to search a vector of list

    Buckets is defined as



    vector<list<T> > buckets;




    template<class T, class HF>
  7. Re: creating an iterator to search a vector of list

    I changed my iterators to what you have and I get this error:
    "is parsed as a non-type, but instantiation yields
    a type"

    What I want my iterator(s) to do is traverse bucket so I can check if an...
  8. creating an iterator to search a vector of list

    I have a template class defined as the following:



    template <class T, class HF>
    class HashTable
    {
    private:

    vector<list<T> > bucket;
  9. Re: Having trouble with a function object and templates

    Which code of mine do you need to see? Do you want to see it for both classes?
  10. Re: Having trouble with a function object and templates

    That was a typo, I already fixed that in the main program.

    If you want to see the whole program well here it is:
    http://faculty.cs.niu.edu/~freedman/340/hw5/hw5.html
  11. Re: Having trouble with a function object and templates

    HashTable.h: In member function &#226;bool HashTable<T, HF>::insert(const T&)
    [with T = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, HF = std::basic_string<char,...
  12. Re: Having trouble with a function object and templates

    When you have multiple templates that are in different classes, aren't you suppose to give them different names? Like one occurance there is a T and an HF?
  13. Re: Having trouble with a function object and templates

    Why did you change the parameter in the operator() from string to HF? I sort of need that to change to an integer so it can be returned. Unless, there is something I'm missing? :[
  14. Having trouble with a function object and templates

    I have two classes defined as the following, with each in two header files (content in bold is what I'm having an issue with):




    class StringHashKey
    {
    public:

    template<class HF>
  15. Replies
    8
    Views
    889

    using typedef

    Can someone help further explain what the point of using typedef? I've read that it's suppose to be used for an alias or something, but I don't quite see the point in using it when it does the exact...
  16. Replies
    2
    Views
    410

    Re: Writing a makefile

    Wow, thanks. I thought it didn't matter when I tried to run it, but it just worked.
  17. Replies
    1
    Views
    410

    Template Classes

    I'm unsure how to write a constructor's heading for a template class





    template <class T, class HF>
    class myClass
    {
    private:
  18. Replies
    8
    Views
    6,683

    Re: I'm a noob, HELP!

    This might help



    #include <iostream>
    #include <string>
    #include <cmath>
    #include <algorithm>
    using namespace std;
  19. Replies
    2
    Views
    410

    Writing a makefile

    I'm having trouble writing a makefile with the following items:

    mainFile.cpp - the main program which will use the two header files (h1.h and h2.h)

    h1.h - header file that simply contains a...
  20. Re: Destructor calling a function issue

    Yep, I just figured that out when I looked at the destroy function. I had used a delete when it wasn't necessary. I managed to fix the problem and get the program to work successfully.

    Thanks for...
  21. Re: Destructor calling a function issue

    Actually, I somewhat figured out the problem. The issue was with the destructor calling a function.

    My destructor was calling the function destroy(TNode*) which caused the program to crash when it...
  22. Copy Constructor and Assignment Operator

    RESOLVED

    I've been working on a program where I'm suppose to write both a copy constructor and assignment operator. Everything worked out fine when new class objects where created and assigned...
  23. Binary Exp Tree - Post order traversal

    I'm trying to traverse a binary expression tree using post order traversal method and having an issue doing it recursively using constant type member functions.

    If the functions weren't constant,...
  24. Replies
    3
    Views
    698

    stacks that store an address

    I'm having an issue understanding how to write code for a stack that stores address.

    Pop an address off the stack and store the address in the new node's right link. Pop another address off the...
  25. Pure virtual functions and virtual functions

    I wrote a practice code to better understand how pure and virtual functions work and had an issue of why I need to declare a new object.



    #include <iostream>
    #include <vector>
    using namespace...
Results 1 to 25 of 28
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured