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

Search:

Type: Posts; User: dcjr84

Page 1 of 33 1 2 3 4

Search: Search took 0.13 seconds.

  1. Re: Pointers, passing by reference, and good 'style'

    IMO, pass-by-reference and pass-by-pointer accomplish the same thing. Mainly, to be able to modify/use some method parameter without copying it so that the changes are reflected in the calling...
  2. Replies
    4
    Views
    825

    Re: calculating length of string

    a as you have defined it is a character array, and not a string object. Therefore, you cannot use the length() member function of that class to determine its length.

    If you are trying to find out...
  3. Replies
    2
    Views
    1,105

    Re: Problem after compiling

    The reason that your program just closes after you type in the name is because some IDE's do not automatically pause the program after execution so you can see the results.

    There are many...
  4. Thread: memset question

    by dcjr84
    Replies
    12
    Views
    1,636

    Re: memset question

    I think the solution from JMS is probably the best


    char buff[128];

    memset( buff, 'A', sizeof( buff ) -1 );
    buff[ sizeof(buff)-1 ] = '\0';


    Also, call me crazy, but I recall when...
  5. Replies
    13
    Views
    1,646

    Re: C++ Pointers

    A lot of good points have been made here by the posters above, you should read them over.

    Not much else I can think of to add at the moment.

    All I can say is that when you start to work with...
  6. Replies
    6
    Views
    1,043

    Re: Need "Urgent" help with a c++ program!!

    As stated above by the other posters, you need to at least attempt this on your own before we will help you.

    This is not a site where we do peoples C++ coding assignments for them.

    If that's...
  7. Replies
    14
    Views
    1,648

    Re: to reduce footprint

    Yes.

    To quote myself...
  8. Replies
    4
    Views
    990

    Re: SortNames Program

    Also, please use [ code ][ /code ] tags when posting source code.

    It is almost impossible to read the code you have posted.
  9. Re: Invoke a function from another running program (EXE) in C/C++

    If I am understanding your question correctly, you are talking about interprocess communication.

    If this is the case, then yes it is possible. Well, to an extent anyways.

    I don't know about...
  10. Replies
    14
    Views
    1,461

    Re: Linked List problem!!!

    * Sigh *

    I am starting to think that my college is the only one in the United States (perhaps the world) that teaches people how to use their debugger to solve coding problems.

    Perhaps I am...
  11. Replies
    14
    Views
    1,648

    Re: to reduce footprint

    There may be some compiler optimization options to do so (at least for release build).

    But I would imagine if there are, then they are compiler dependent.

    Meaning, you would need to consult...
  12. Replies
    14
    Views
    1,461

    Re: Linked List problem!!!

    Have you tried using your debugger?

    It is extremely helpful when your program compiles fine, but does not behave as you expect it to.

    You can check variable values, and set breakpoints to stop...
  13. Replies
    18
    Views
    1,982

    Re: Problem with '

    I lost you on this line here.

    It doesn't make any sense.

    You can't just assign your struct the value of 128. Also, you already use the write() function, so what is the need for <<?

    If you...
  14. Replies
    5
    Views
    885

    Re: Two questions...

    My apologies :D

    Naturally, I was referring to a console program when I said this.

    Obviously, if you are a truly running a DOS program, then you will not be able to use Windows API's because...
  15. Replies
    5
    Views
    885

    Re: Two questions...

    Though the above poster made a good suggestion to use the boost::threads library, I thought I should throw in my two cents here.

    Unless you have multiple processors in your computer, there is no...
  16. Replies
    3
    Views
    875

    Re: Need Help With Tic Tac Toe

    Have you tried using your debugger to check variable values and such during your program's execution?

    Perhaps this will give you some insight as to why it doesn't work all the time.
    ...
  17. Thread: How to do this

    by dcjr84
    Replies
    4
    Views
    744

    Re: How to do this

    1) Use [ code ][ /code ] tags when posting source code.

    2) Your header files are incorrect. Standard library headers with .h are not used anymore.
    (Though I see you use printf(), so this is...
  18. Replies
    6
    Views
    1,212

    Re: Inheritance Issue, Linker error

    Basically, what screetch is saying is that when you are dealing with templates, you really can't separate the class declaration from the members functions like you would with normal, non-templated...
  19. Replies
    5
    Views
    1,097

    Re: when is object created ???

    I deleted my post.

    I was half asleep on the keyboard when I made it.

    Later when I saw what I had typed, I decided it was the most absurd post I had ever made.

    Still not sure of the reasoning...
  20. Thread: weird problem

    by dcjr84
    Replies
    7
    Views
    871

    Re: weird problem

    I can't understand you.

    What was wrong with laasunde's suggestions?
  21. Thread: weird problem

    by dcjr84
    Replies
    7
    Views
    871

    Re: weird problem

    You need to post all of your code.

    There is no way we can figure out what is wrong from this little snippet.

    And use [ code ][ /code ] tags when posting source code.
  22. Replies
    2
    Views
    2,793

    Re: Need Help output repeating last line

    Phillip's second suggestion is the the best way to do this.

    I highly recommend using it :D
  23. Thread: getline help

    by dcjr84
    Replies
    3
    Views
    967

    Re: getline help

    Can I take a wild guess at this...

    Do you use cin >> someVariable somewhere before you do the getline()?

    I am willing to bet that you do.

    If so, this is the problem.

    To fix it, you need...
  24. Replies
    7
    Views
    1,325

    Re: atoi is making my program crash.

    The string::c_str() member function returns a const char*.

    The syntax he is using is correct.


    You are correct Phillip. This needs to be checked also.


    I admit, I didn't notice it at...
  25. Replies
    7
    Views
    1,325

    Re: atoi is making my program crash.

    Well, this still isn't enough code to reproduce the result effectively, but I am gonna take a guess as to what is causing the problem...

    Look here...


    string score[9] = "";

    ...
Results 1 to 25 of 815
Page 1 of 33 1 2 3 4





Click Here to Expand Forum to Full Width

Featured