Search:

Type: Posts; User: Rog

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    3,890

    You can't do it with scanf alone. A common way...

    You can't do it with scanf alone. A common way to pre process input is to read stdin using fgets, scan the buffer for the expected characters, then call sscanf to put the input into the proper...
  2. Replies
    4
    Views
    1,949

    remove the '&' from the scanf. With scanf you...

    remove the '&' from the scanf. With scanf you don't take the address when arg 2 is an array. Also in the fopen remove the double quotes and '*' from filename. You need to add something like:


    ...
  3. Thread: Newbie Question

    by Rog
    Replies
    5
    Views
    1,141

    On windows you can use the Win32 console API...

    On windows you can use the Win32 console API functions to use color. Don't waste time with trivial tasks like colored text. Instead try to tackle some real programming problems. Learn how to...
  4. Replies
    7
    Views
    1,615

    It doesn't do that by default... check your...

    It doesn't do that by default... check your process creation flags and startupinfo structure and make the required changes. All parameters are fully explained in the Platform SDK.

    -Rog
  5. Replies
    2
    Views
    943

    Usually you can use a response file. List the...

    Usually you can use a response file. List the options for the linker and you should see something like '@response file'. Put all the options and parameters into the response file and pass it on the...
  6. Thread: _T Macro Question

    by Rog
    Replies
    9
    Views
    4,432

    When I am doing MFC programming (as opposed to...

    When I am doing MFC programming (as opposed to API programming) I always use CString. It is an efficent class in terms of memory management, and all the string manipulation and conversion functions...
  7. Thread: C++ moving to MFC

    by Rog
    Replies
    9
    Views
    1,116

    You can actually get away with very little formal...

    You can actually get away with very little formal C++ OOP knowledge. IMO, that is one of the down sides. MFC has been criticized often because it disregards many of the conventions of object...
  8. Thread: C++ moving to MFC

    by Rog
    Replies
    9
    Views
    1,116

    MFC will save you a ton of time over straight...

    MFC will save you a ton of time over straight API. It does similar for C++ what VB does for BASIC. The learning curve is a bit steep at first. Check out codeproject dot com.
  9. Replies
    3
    Views
    950

    Excuse me if I was vague. :) Too many late...

    Excuse me if I was vague. :) Too many late nights has that effect on me. ;)

    Forget the stuff I told you... those are old C language ways of validating input. You can do it very easily in C++...
  10. Hmmm... good point. though the ios_base was in...

    Hmmm... good point. though the ios_base was in response to a different question from a different poster.

    edit #1: fixed misspelled word
  11. Replies
    9
    Views
    1,135

    If you want to stay away from .NET you will need...

    If you want to stay away from .NET you will need to get the Software Developers Kit for Windows Mobile based Pocket PCs. The SDK gives you everything you need to write programs in C++

    Search on...
  12. Replies
    3
    Views
    950

    use isdigit() to check firstnum[0] thru...

    use isdigit() to check firstnum[0] thru firstnum[strlen(firstnum)-1] in a for loop. Tip: watch out for '\n' characters at end of input.

    another way is to read the input using fgets() to read...
  13. Replies
    9
    Views
    1,135

    If I was going to write for a PDA running windows...

    If I was going to write for a PDA running windows I would start looking at the .NET stuff. C++ is powerful, but it tends to be time consuming for the programmer. C# will allow you to knock out...
  14. Sure, you could use state flags to test for eof. ...

    Sure, you could use state flags to test for eof. I believe it is ios_base::eofbit. You can read the flags directly and do bitwise comparisons, though I prefer to use the built in functions...
    ...
  15. This is what you need to do: 1)create a buffer...

    This is what you need to do:
    1)create a buffer to store one line of text from the file
    2)open the file for reading
    3) test the stream to make sure it is open
    4) read one line from the file
    5)...
  16. current should be and int.

    current should be and int.
  17. Thread: dectobin

    by Rog
    Replies
    6
    Views
    10,029

    Interesting. I like the way you utilize the...

    Interesting. I like the way you utilize the standard library. The insert could represent undesired overhead (not in this little exercise, of course) , but that would depend on how the class was...
  18. Thread: dectobin

    by Rog
    Replies
    6
    Views
    10,029

    COOL! :D But it isn't formatted and...

    COOL! :D

    But it isn't formatted and justified like mine is... I mean, mine is definitely easier to read. How would you filter the output from bitset to formate it like mine? (no leading zeros...
  19. Thread: dectobin

    by Rog
    Replies
    6
    Views
    10,029

    dectobin

    I was looking at the other things on this site and noticed the challenges. The dectobin problem looked easy so I jumped on it... it took me no more than two minutes to get the basic algorithm...
  20. Replies
    9
    Views
    3,159

    And that's why I replied when I saw that you had...

    And that's why I replied when I saw that you had it wrong. ;)

    Your method of using a pointer to char does not make the code portable. Your pointer arithmetic is accomplishing essentially the...
  21. Replies
    9
    Views
    3,159

    The problem with doing it that way is you have to...

    The problem with doing it that way is you have to get it right depending on the platform. Since this is a DOS compiler it's reasonable to assume it will run on an x86 machine ("Little Endian"). ...
  22. Thread: MSVC++ help

    by Rog
    Replies
    4
    Views
    1,222

    I might as well tell you this now, because you're...

    I might as well tell you this now, because you're going to learn it soon enough. A programmer needs to be very resourceful and self starting. You won't get much sympathy if you take an "I want...
  23. Replies
    6
    Views
    2,295

    Why do you need this function anyway? It is a...

    Why do you need this function anyway? It is a throwback to the days of DOS. I suggest you concentrate on the event driven paradigms present in modern Windows and Linux development. The basics are...
  24. Thread: MSVC++ help

    by Rog
    Replies
    4
    Views
    1,222

    That is an unusual problem that you are having...

    That is an unusual problem that you are having with the installation... though I have seen similar things happen with MS software in the past. It sounds like something is amiss with the registry. ...
  25. Replies
    3
    Views
    6,230

    foo; is same as: &foo[0]; address of...

    foo;

    is same as:

    &foo[0];

    address of second array element is then:

    &foo[1];
Results 1 to 25 of 78
Page 1 of 4 1 2 3 4