Search:

Type: Posts; User: TmX

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    3,482

    Hi salem, Thanks for the hint. After some...

    Hi salem,

    Thanks for the hint. After some Googling, it seems the correct keyword is "array decaying".

    This one is the correct version, I think.



    #include <stdio.h>
    #include <string.h>
  2. Replies
    2
    Views
    3,482

    byte array copying problem

    Let's say I have this following byte array:


    {0xAB, 0x34, 0x15, 0xFD, 0x76, 0xED};

    What I want is to have a new array which consists of:


    {0x34, 0x15, 0xFD, 0x76}
  3. Replies
    1
    Views
    1,966

    Making a text based progress bar

    I found a BCX code about making a text based progress bar:
    http://d-apps.com/files/coding/bcx/cprog.zip

    I tried to rewrite the code in C, and this is the result:

    #include <windows.h>
    #include...
  4. Replies
    6
    Views
    6,118

    Inline assembly and compiler optimizations?

    I read several times that using inline assembly is considered as a bad practice, since it will interfere with the compiler optimization.

    And recently, I read this:


    How it's possible?
  5. Replies
    0
    Views
    4,985

    How to use CreateMenu and AppendMenu

    I'm trying to write a simple hook (a harmless one, though).


    #include <windows.h>
    #include <stdio.h>

    int main(){
    HWND hwnd;
    HMENU menu;
    HMENU subMenu;
  6. Replies
    2
    Views
    1,120

    How to implement "time" in Windows ?

    In *nix, there the time utility for measuring the execution time of a command

    I'm interested in writing my own, so here's my quick attempt :


    #include <stdio.h>
    #include <string.h>
    #include...
  7. Replies
    6
    Views
    1,320

    What does this struct for ?

    I forget where I got this snippet from.
    Anyway, here's the code



    struct foo {
    char ch : 8;
    int aaa : 2;
    long bbb : 3;
    };
  8. Replies
    2
    Views
    7,279

    Intel syntax on MinGW ?

    This is a CPUID code.
    It successfully compiled on Pelles C.


    //Author - Niloy Mondal
    //Reference - Intel Instruction Set Reference Volume 2
    #include <stdio.h>
    #include <conio.h>

    int main()
  9. Replies
    1
    Views
    1,623

    Input-based permutation

    Let's say I have a string "abcdef"
    If I input n = 3, how to create a permutation of 3 like this :
    abc
    abd
    abe
    ...
    ...
    edf ?
  10. Replies
    4
    Views
    2,411

    Isn't this about the compiler optimization ? Or...

    Isn't this about the compiler optimization ?
    Or probably the grammar has something to do with it's speed
  11. Replies
    4
    Views
    2,411

    What makes C so popular

    What makes C so popular, compared to other programming languages ?
    I mean, C has been used (and still being used) to write stuffs like OS, database engine, game, etc
  12. Thread: C GUI library ??

    by TmX
    Replies
    7
    Views
    2,665

    err .. I mean the library for Windows &...

    err .. I mean the library for Windows & statically linkable ...
  13. Thread: C GUI library ??

    by TmX
    Replies
    7
    Views
    2,665

    C GUI library ??

    Such libraries are exist for C++, namely wxWidgets,FLTK, etc.
    Are there such libraries for C ?
  14. Thread: Cygwin & MinGW

    by TmX
    Replies
    3
    Views
    2,201

    Cygwin & MinGW

    I have Cygwin & MinGW installed on my laptop.
    In the PATH variable , Cygwin has the higher priority.
    But sometimes I want to invoke the MinGW GCC from the command line withoug CD-ing to it's...
Results 1 to 14 of 14