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

Search:

Type: Posts; User: ZuK

Page 1 of 53 1 2 3 4

Search: Search took 0.05 seconds.

  1. Thread: C: getchar

    by ZuK
    Replies
    2
    Views
    743

    Re: C: getchar

    There is another problem with your code.
    EOF is usually defined as the int -1. If you assign it to a char then the value will be truncated and the test will never be true.
    BTW that is the reason...
  2. Replies
    10
    Views
    818

    Re: Why am I getting a compiler error?

    Trouble is that in the original code m_var is a reference to string.
    I got it to compile without errors with g++ 4.6.3
    but somehow that feels wrong


    #include <iostream>
    #include <string>...
  3. Thread: Sorting problems

    by ZuK
    Replies
    5
    Views
    959

    Re: Sorting problems

    You have bufferoverflows in your bubblesort.
    And please use CODE tags when posting code.
    Kurt
  4. Replies
    3
    Views
    459

    Re: Need help with this program

    remove it. It always returns true.

    But I could imagine that the original intent was to check for non empty words.

    if ( word > "" )
    would be the same as

    if ( !word.empty() )

    Kurt
  5. Re: Trouble linking libsndfile dll in Visual Studio 2010 Express

    How is the function called sf_open or sfopen ?
    Kurt
  6. Replies
    1
    Views
    363

    Re: Do I need a default constructor?

    It depends on the way you want to use your class. e.g. if you want to add objects of your class into a standard container then it is needed.

    That has nothing to do with the existence of a default...
  7. Re: linker error: inlining methods inside a .h file

    Show a minimal code example that shows the same error.
    Kurt
  8. Replies
    4
    Views
    397

    Re: vector- algorithm const problem

    The operators < and > of GreedyObject and MNode should be declared const.
    Also you have to #include <ctime> and <cstring>
    Kurt
  9. Replies
    14
    Views
    860

    Re: Need real source of error

    C_IADS_TCP_Manager *mp_IADS_TCP_Manager;
    If the class is really called C_IADS_TCP_MANAGER ( all capitals ) that would explain the error message
    Kurt
  10. Re: Output Sorting Error Using Pointer Notation[Beginners Question]

    person::getsalary() doesn't return anything ( it should if I look at the declaration ) and it seems to be implemented as pure input function.
    Kurt
  11. Replies
    51
    Views
    4,020

    Re: Interview Questions

    There is one thing that has not been stated clearly when talking about the difference between copy constructor and assignement operator.
    The assignement operator has to release any resorces that the...
  12. Re: How can I initialize structures AFTER declaration? (begginers question)

    Is this what you try to do ?

    #include <iostream>
    #include <string>

    using namespace std;

    struct clientdata
    {
    string vClientName;
  13. Replies
    4
    Views
    1,096

    Re: g++ getline and atof

    a 4 byte float ( single precision ) has only about 7 significant decimal digits.
    so you can only expect a float and a double to be same for 7 digits.
    if you need more precicion you have to use...
  14. Replies
    5
    Views
    1,175

    Re: ifstream not reading next line?

    Not true. '\n' is whitspace and the streamextractor for an int skips leading whitspaces by default.
    Kurt
  15. Replies
    5
    Views
    1,175

    Re: ifstream not reading next line?

    I'd add some output statements
    e.g.

    int x = 0, y = 0, z = 0;
    ifstream data("blah.txt");
    while( data >> x >> y >> z)
    {
    std::cout << "x:" << x << " y:" << y << " z:" << z << std::endl;
    ...
  16. Replies
    5
    Views
    1,175

    Re: ifstream not reading next line?

    First of all you should check for a successfu read.
    Seems that reading fails and that's why you get an infinite loop.
    try something like this

    int x = 0, y = 0, z = 0;
    ifstream data("blah.txt");...
  17. Replies
    8
    Views
    721

    Re: hii need help please

    If that program is due tomorrow then you're quite late.
    Your main mistake is that the couresdata that you're manipulating or printing is local to the functions.
    That is why the data is lost after...
  18. Replies
    8
    Views
    721

    Re: hii need help please

    I'm sorry that I didn't understand any of your other "questions"
    Kurt
  19. Replies
    8
    Views
    721

    Re: hii need help please

    break and continue won't have much effect in your code. They work only when inside of loops.
    You are missing some curly braces.

    void addnewcourse()//idont want to put anything here in parameters...
  20. Re: CreateProcess( fails when file name same similar with Directory name

    "\"C:\\Documents and Settings\\Notepad.exe\" \"C:\\My Directory\\ReadMe.txt\""
  21. Re: Detect arrow key press in c++ for linux only, 80% of the job is done.

    You might want to read http://en.wikipedia.org/wiki/ANSI_escape_code
    Kurt
  22. Replies
    15
    Views
    1,318

    Re: Question about malloc and new

    I'm not shure that I understand what you are asking
    placement new comes to my mind

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

    void * my_allocate( size_t sz )...
  23. Replies
    9
    Views
    515

    Re: typcasting a struct

    Well. I understand that arrays of size 0 are not legal. Some/most C compilers let you get away with this kind of structures just to be able to append some data to this structures.
    Usually used this...
  24. Replies
    9
    Views
    515

    Re: typcasting a struct

    You can't assign to an array.

    Use strcpy() instead.


    strcpy( (char *)x->content, message.c_str());
    Kurt
  25. Re: IXMLDOMDocument::load failed if used encrypted characters

    I would just convert the ascii code of each of the password characters into a hex string.
    Kurt
Results 1 to 25 of 1309
Page 1 of 53 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