Search:

Type: Posts; User: papagaio

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    11
    Views
    3,762

    I disagree on the "doing nothing" part since a...

    I disagree on the "doing nothing" part since a Windows form its also a real-time loop (just not as visible as when working in a lower level with the WinAPI). But I get what you are saying, there are...
  2. Replies
    11
    Views
    3,762

    Thanks for the input, I think I get the main idea...

    Thanks for the input, I think I get the main idea behind timing events.

    I also searched some articles on XNA and perhaps it may be even simpler to use it for my project, since it seems to handle...
  3. Replies
    11
    Views
    3,762

    I'm not using XNA because my program will be very...

    I'm not using XNA because my program will be very simple (an educational MIDI-input based game) and I don't want to have to learn too many things at the same time. If I can get the concept to work...
  4. Replies
    11
    Views
    3,762

    game programming: managing time and OOP

    Hello!

    I'm amateur who has been learning C programming for a couple of years and has recently moved to C#. I have been doing some reading on basic OOP concepts and I would like to program a very...
  5. Replies
    1
    Views
    1,227

    Working with ComboBoxes

    Hello!

    I have a basic C background an am experimenting C# for quick Windows development. I am amazed at the sheer simplicity of writing GUIs with Windows.Forms, but now I have stumbled into a...
  6. tried that, but seems a bit too complicated for...

    tried that, but seems a bit too complicated for me. Here's my simplistic solution:



    float my_float = 3.495;
    int my_int = (int)my_float;

    float my_float2 = (my_float -...
  7. Float to string without using standard library functions

    Hello!

    I'm trying to figure out how to write a function that convert a 32-bit single precision floating point to a string. I am working with an embedded system (actually, and old MIPS-based...
  8. Replies
    6
    Views
    1,020

    I am stripping leading whitespaces, then reading...

    I am stripping leading whitespaces, then reading the type of entry (hence why I am using strstr) and then the filename, which may or may not contain spaces (but will end on a newline).

    Anyway, I...
  9. Replies
    6
    Views
    1,020

    I am using fgets to read each line of my file: ...

    I am using fgets to read each line of my file:



    while (fgets(line, 2048, fp))
    {
    // parsing happes here
    }
  10. Replies
    6
    Views
    1,020

    String functions (returning data)

    Hi, can someone help me with my string function?

    My program parses a text files and needs to read string entries either with our without spaces (actually, filenames). Since sscanf(ptr, "%s",...
  11. Ah, thank you! Just to make sure I'm making sense...

    Ah, thank you! Just to make sure I'm making sense of pointers, would this be correct:



    int *MyArray[10];

    for (i = 0; i <= 10; i++)
    {
    myArray[0] = (int*)malloc(sizeof(int) );
    }
  12. Syntax for pointing to a array and acessing its elements

    Hello, can somebody give me some help about using pointers to arrays?

    What I want to do is to use a array of integers. This is the come I came up with:

    int *myArray[10];

    myArray =...
  13. Replies
    7
    Views
    3,213

    By standard library I mean stdio, stdlib, etc....

    By standard library I mean stdio, stdlib, etc. I'm an occasional programmer so I'm still learning about so sometimes I'm just not sure which function to use. I did read the scanf, fscanf and sscanf...
  14. Replies
    7
    Views
    3,213

    Text file parsing

    I want to learn how to parse text files. Especifically, I want to work with .obj files.

    I have read about the the basics of the obj format, but I'm wondering what standard library functions...
  15. Undoing fputc (removing a few bytes before end of file)?

    Hi!

    I have been writing a binary file using the fputc function. Is there a function that offer a 'unfputc' ?

    This pseudo-code might help understand what I'm looking for:



    #include...
  16. Replies
    1
    Views
    1,970

    [C] Creating a simple windows front-end

    I'm trying to learn the basics of WinAPI by writing a frontend for a console program in C.

    However, I'm not sure what is the function to call my command-line program. After some research, I found...
  17. Replies
    3
    Views
    1,350

    Problem with strings and filenames

    Hi,

    I have made this a simple command-line program which reads through a file and changes a few characters (ie, all "9" are replaces with "8"). It takes only a single argument, which is the input...
  18. Ops, a few minutes after I posted I realized I...

    Ops, a few minutes after I posted I realized I should have used the switch statement :P.

    Anyway, the problem was really the file mode, specyfing "wb" corrected the problem. Thanks a lot, I...
  19. Changing characters in a file using a buffer

    Hi. I did this simple program to change the '<' characters to '>' in a file and vice-versa. However, when writing the new file the newlines got screwed up and there seems to be random spaces. It was...
  20. Replies
    1
    Views
    4,369

    Reading and processing input from keyboard

    Hi,

    I have some questions about how to work with input from the keyboard. This code can read characters from the keyboard and print them:



    #include <stdio.h>

    main()
    {
  21. Reading an hex offset from command-line argument

    Hi, I need some help to finish a simple program.

    I want to make it read a hex number from a command-line argument and use it as an integer, for the fseek command.

    It works like this: ...
  22. Replies
    7
    Views
    1,652

    Thanks, that code was instructive to me in many...

    Thanks, that code was instructive to me in many ways. I have to spend a few hours learning about pointers syntax, these is still something that confuses me a lot.
  23. Replies
    7
    Views
    1,652

    Question about fwrite and "swapped" numbers

    Hi!

    I'm learning about C File I/O and writing my first test programs and I'm curious about something. Here is a function that write 2 byte signed integers to a file:



    void writexyz(FILE*...
  24. Replies
    3
    Views
    1,445

    Thank you, that's very helpful :). I thought...

    Thank you, that's very helpful :).

    I thought the "++" increment could be only used for integers, so I had the wrong idea that I had to use some sort of typecast. It's much simpler, thank you...
  25. Replies
    3
    Views
    1,445

    Question on strings

    Hi,

    I'm a begginer in C (learning it for fun) and I have a question regarding strings.

    I programmed a simple 'extractor' for a file format and I want each of my files to be named sequentially...
Results 1 to 25 of 30
Page 1 of 2 1 2