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

Search:

Type: Posts; User: Russco

Page 1 of 31 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    5
    Views
    793

    Re: [RESOLVED] overloading operator+

    operator + is better written as a nonmember which kicks down to the member operator +=. For a full discussion on why some operators are better written as nonmenbers read this.
  2. Replies
    2
    Views
    622

    Re: Pass arguments to typedef?

    That is a 'template typedef'. Up until C++0x they didn't exist, and I am not sure if they exist in C++0x either. They can be simulated somewhat, details here and here.
  3. Replies
    28
    Views
    1,612

    Re: need help please

    Nope. Not wierd at all. Learn to use your debugger. Use your debugger.
    Watch this.
  4. Replies
    28
    Views
    1,612

    Re: need help please

    Most bugs dont cause the compiler to spit out an error. Most occur during runtime. For this you need to attach the debugger and step through your code watching the variables closely as i have already...
  5. Replies
    3
    Views
    1,498

    Re: I need an algorith to solve this problem

    Are all the cuboids filled to capacity with water?
    If so surely its just adding up the volume of each of the specific cuboids with the volume of each cuboid being given by the formula length * width...
  6. Replies
    1
    Views
    1,021

    Re: Algorithm for dynamic resource allocation

    Plenty of ideas here.
  7. Replies
    3
    Views
    2,752

    Re: Symbol Recognition

    You could start here.
  8. Replies
    1
    Views
    1,037

    Re: queue data structure question

    1. ArrayQueue - There is no direct C++ version but you can get close by using std::queue<T> which is based around a deque.
    2. ListQueue - Use std::queue< T, std::list<T> > - queue using a doubly...
  9. Thread: text processing

    by Russco
    Replies
    20
    Views
    1,051

    Re: text processing

    IDE's have nothing to do with text processing, I just answered your 'what is codeblocks' question.
    For text processing, what do you want to do?
    Its already been answered. What is wrong with the...
  10. Thread: text processing

    by Russco
    Replies
    20
    Views
    1,051

    Re: text processing

    No. Its an IDE, an integrated development environment. Generally these consist of a code editor, a build system, a debugger, a compiler and a linker. See here.
  11. Replies
    28
    Views
    1,612

    Re: need help please

    Use your debugger and find out. Learning to debug your code is part of learning to program. work out on pen and paper what values you expect in variables and watch to see whats actually happening as...
  12. Replies
    28
    Views
    1,612

    Re: need help please

    fscanf( file, .............. )

    how hard can it be. you open the file but never read from it. You have to tell the fscanf where to read from.
  13. Replies
    28
    Views
    1,612

    Re: need help please

    btw you will also need to drop the asterix here

    i<*ncircles

    as ncircles is a global int, not an int* so dereferencing it is completely wrong.
  14. Replies
    28
    Views
    1,612

    Re: need help please

    Give up programming its not for you!


    FILE *file;
    if (( file = fopen( filename, "r" )) == NULL )

    Ever going to do anything in particular with that open file pointed to by the FILE* called...
  15. Replies
    28
    Views
    1,612

    Re: need help please

    For starters change it to


    void ReadFile( const char* filename )

    change the call to ReadFile in main to only pass the filename.
    change the scanf's to fscanf's with the FILE* as the first...
  16. Replies
    28
    Views
    1,612

    Re: need help please

    the variables you pass into the function are all GLOBAL. that means they can be accessed from everywhere. The only parameter that function needs is the filename. fscanf is slightly different to...
  17. Replies
    28
    Views
    1,612

    Re: need help please

    In ReadFile you should be reading from a file not from the keyboard. Surely those scanf's should be fscanf's. Also drop the ncircles parameter completely as that variable is global as are s and t...
  18. Re: how to process string with boost::sregex_iterator in reverse order

    Use rbegin() and rend()
  19. Replies
    25
    Views
    995

    Re: Function problem

    My god, this is C++ not BASIC. Remove those gotos and replace them with loops and conditionals.
    C++ supports 3 types of loop, they are counted (for loop), top tested (while loop ) and bottom tested...
  20. Replies
    27
    Views
    2,224

    Re: C++ question about arrays....

    Personally I think that STL use should be taught before dynamic allocation. Of course you need to learn both but why start with the more low level concept. Should we all learn asm before C++? No, of...
  21. Replies
    27
    Views
    2,224

    Re: C++ question about arrays....

    I think code like this could be a problem. free wont call destructors and replacing it with delete[] wont work as realloc will not do new[]'s bookkeeping. Could lead to resource leaks if the type...
  22. Re: Accessing class functions from parameter of template?

    insert_node is expecting a pointer, you pass it an object. pass its address instead by prefixing it with & like so


    blank.insert_node(&blank, blank.key_value, blank.item_value);
  23. Re: Accessing class functions from parameter of template?

    atoi expects a const char* and you are giving it a std::string. change


    else blank.item_value.id = atoi(str);

    to


    else blank.item_value.id = atoi(str.c_str());
  24. Re: Accessing class functions from parameter of template?

    why are you templating create_database in studentRecord?
    Its not necessary.

    should just be


    bst<studentRecord, int>* create_database();

    Also on another note why is student_record.h header...
  25. Re: Accessing class functions from parameter of template?

    post a small but complete example that exhibits the problem (inside code tags). Try to cut down your code to just the bare essentials, dont dump the lot on us.
Results 1 to 25 of 760
Page 1 of 31 1 2 3 4


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center