Search:

Type: Posts; User: mc088

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    1,597

    Ok Thank you. I did forget the % sign for the...

    Ok Thank you. I did forget the % sign for the printf. Problem solved :)
  2. Replies
    3
    Views
    1,597

    What does this compiler message mean?

    Hi,

    I am currently using Microsoft Visual Studio community 2017.

    Was writing simple C program to calculate taxes. hours worked, and such, and when I compiled the program, the output window...
  3. Replies
    1
    Views
    1,124

    need help with updating a file

    Hi,

    Just trying to write some code so I can figure out how to allow user to add entries to a file or modify (update) an existing entry in a file.

    Add functionality will come later, but for...
  4. Replies
    11
    Views
    2,844

    Thanks everyone. I installed latest official...

    Thanks everyone. I installed latest official Visual C++ express 2015 and uninstalled the old 2010 version. From what I read, Visual C++ express 2015 supports C++11, which should support most, if not...
  5. Replies
    11
    Views
    2,844

    Thanks for all the help Algorithm :) Testing...

    Thanks for all the help Algorithm :)

    Testing out your new code after your EDIT, in visual studio compiler, there is no error shown in the output box. Console/CMD popups up normally as expected....
  6. Replies
    11
    Views
    2,844

    Hi algorism, I ran your code with both the...

    Hi algorism,

    I ran your code with both the Code Blocks and with the Visual C++ express 2010 and Code Blocks is happy but Visual C++ expresss 2010 has complaints.

    Screenshot of what I my screen...
  7. Replies
    11
    Views
    2,844

    Yes, my code in a .c file, and yes, I am...

    Yes, my code in a .c file, and yes, I am compiling C program, and not C++. (chose c project in code blocks, set the settings to compile as C in microsoft ide with the source file renamed as a .c...
  8. Replies
    11
    Views
    2,844

    What is the issue with malloc?

    Hi,

    I tried writing a code to manipulate text files (code below). I currently have a students.txt file. The goal of this code is to read in student information from the students.txt file and the...
  9. Replies
    10
    Views
    2,858

    question about fprintf vs printf

    Hi,

    In error checking part of code below (where the existence of file to read is checked), my (hopefully correct) understanding is printf would print to stdout, and the fprintf statement...
  10. Replies
    5
    Views
    1,125

    Thank you very much :)

    Thank you very much :)
  11. Replies
    5
    Views
    1,125

    Thank you, I got it to work now. I went to the...

    Thank you, I got it to work now. I went to the settings and found out where to get the compiler to compile as 'c" and not "c++"".


    Ok, so basically enum is more of an int list with numbers...
  12. Replies
    5
    Views
    1,125

    need help with enumeration

    Hi,

    the following code (in the first box below) s an example from my C book (except I included the stdafx.h because visual c++ express 2010 needs it to run any c program)

    The output (according...
  13. Replies
    8
    Views
    1,420

    Ok. Just for an example, if I were to just be...

    Ok.

    Just for an example, if I were to just be looking at gray code, with the following sequence:

    input -> output
    0b000 0b000
    0b001 0b001
    0b010 0b011
    0b011 0b010
    0b100 0b110
  14. Replies
    8
    Views
    1,420

    Although I can get Salem's suggestion to work, I...

    Although I can get Salem's suggestion to work, I thought of changing the test program so that I could have all the predefined states of the state machine stored like in a table (look up table maybe?...
  15. Replies
    1
    Views
    1,126

    Accessing structure members

    Hi,

    The code below is an example from my C book, which displays "Ace of Spades" using three different ways given the struct.

    Just wondering. which way is the best and why?


    Thank you.
  16. Replies
    8
    Views
    1,420

    Thank you. That works fine. :)

    Thank you. That works fine. :)
  17. Replies
    8
    Views
    1,420

    Oh I probably should write a test program to...

    Oh I probably should write a test program to supply the desired sequence of button presses instead of what I Was thinking in my previous post above, but how is best way to go about it? (sorry if i...
  18. Replies
    8
    Views
    1,420

    I mean like is there any better way to simulate...

    I mean like is there any better way to simulate pressing a button besides just manually entering in 1 and 0 for the two buttons, and is there a better way to distinguish between just having pressed...
  19. Replies
    8
    Views
    1,420

    good way to simulate two push buttons?

    Let's say we have a control box with two buttons (button 1 and button 2) and there are three possible operations

    1. When the user presses button 1 and then releases it, the text "blue" should be...
Results 1 to 19 of 24