Search:

Type: Posts; User: twiki

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    13,219

    If you just want to blink text, the following...

    If you just want to blink text, the following will work



    /* note: This doesn't work properly in gnome-terminal
    * but color codes etc. do oddly enough */
    printf("\033[5;32;40m");...
  2. Try using getchar() instead of scanf

    Try using getchar() instead of scanf
  3. Replies
    5
    Views
    9,531

    Code::Blocks supports full custom color schemes...

    Code::Blocks supports full custom color schemes for the code editor environment. I just checked... I set up a theme resembling the old Borland Turbo-C IDE inside of 3 minutes. Just keep fiddling...
  4. Replies
    21
    Views
    3,517

    I've avoided learning Python because the...

    I've avoided learning Python because the interpreter is very picky about indentation. The TAB width etc. have to be just right or you get errors.

    So rather than editing my preferences for vim, I...
  5. Replies
    21
    Views
    3,517

    I use a mixture of BSD KNF and Allman style... It...

    I use a mixture of BSD KNF and Allman style... It works for me and I don't get a lot of complaints... Not saying I've never had any though...

    I have no idea what it means about one's personality...
  6. Replies
    9
    Views
    3,133

    My apologies. I did not mean to imply that you...

    My apologies. I did not mean to imply that you were wrong. I simply quoted your post with a reply.

    I only wanted to make a point about size_t being defined in the headers. Which according to that...
  7. Replies
    9
    Views
    3,133

    According to WG14/N1256 Committee Draft —...

    According to WG14/N1256 Committee Draft — Septermber 7, 2007 ISO/IEC 9899:TC3

    The return value of sizeof is "implementation-defined" and is said to be an unsigned value. And it says that size_t IS...
  8. Replies
    9
    Views
    3,133

    Ok. It appears that for compilers complying with...

    Ok. It appears that for compilers complying with C99, that size_t is defined by the compiler. However, I'm not on my Unix box at the moment and only have a copy of MingW to check. But here are the...
  9. I seriously doubt it's equivalent to taking a...

    I seriously doubt it's equivalent to taking a year-long course. They apparently do cover a lot of material from their first-year computer science course compressed in a series of lessons lasting 12...
  10. Replies
    9
    Views
    3,133

    size_t and unsigned int can both be the same size...

    size_t and unsigned int can both be the same size in bytes, but size_t is defined in the headers whereas unsigned int is defined by the compiler itself.

    puts is like printf except that puts does...
  11. Replies
    2
    Views
    1,845

    Codeblock's default project settings for some...

    Codeblock's default project settings for some reason don't include the correct Linker settings to link against fltk or wxwidgets... You'll have to add those to your linker settings for both the Debug...
  12. A new player in online computer science courses

    I was reading slashdot.org and read an article discussing a "new player" in online computer science courses.

    The University of New South Wales is offering an Online Computer Science Course...
  13. Thread: Help with id3lib

    by twiki
    Replies
    7
    Views
    2,901

    You're welcome... Hope the coding goes well from...

    You're welcome... Hope the coding goes well from here on out!
  14. Thread: Help with id3lib

    by twiki
    Replies
    7
    Views
    2,901

    I just checked... memcpy and the like are indeed...

    I just checked... memcpy and the like are indeed defined in <cstring> and NOT <memory>.... Including <cstring> in your program should have fixed it... Not sure why you're getting that error about it...
  15. Thread: Help with id3lib

    by twiki
    Replies
    7
    Views
    2,901

    Try including and or...

    Try including <string.h> and <stdlib.h> or <memory> for c++ version in the namespace std
  16. NCURSES Announcing ncurses 5.9 - GNU Project -...

    NCURSES Announcing ncurses 5.9 - GNU Project - Free Software Foundation (FSF)

    NCURSES is probably your best bet. It will also help make your code portable to many Unix environments. It's been...
  17. Replies
    11
    Views
    1,257

    Yeah. My mistake. I read it as char...

    Yeah. My mistake. I read it as char phrase[length] where phrase was already declared at the top of main as a single character. I didn't notice that it was a new character array named appropriately...
  18. Replies
    11
    Views
    1,257

    #include #include int...

    #include <stdio.h>
    #include <string.h>


    int main(void)
    {

    char phrase[1024]; /* you have to allocate space for string input
    * I've allocated 1024 bytes or 1...
  19. Nevermind... I've answered my own question. It...

    Nevermind... I've answered my own question. It seems I have to call nodelay(my_win,TRUE) for the window in question so that wgetch(my_win) doesn't wait for input, but returns "ERR" instead of waiting...
  20. NCURSES: Testing if a window has input instead of calling wgetch()

    I'd just like to start by saying that ncurses/curses is one of the most finicky libraries I've ever dealt with... Everything has to be just right, or you get some funky results...

    I'm learning...
  21. Thread: Background Help

    by twiki
    Replies
    2
    Views
    1,449

    You could try the ncurses library. It's been...

    You could try the ncurses library. It's been ported to windows. I don't program under windows and haven't for quite some time really. If you're using Linux or another flavor of Unix with ANSI...
  22. Replies
    29
    Views
    2,002

    char buffer[200]; /* safer length for your buffer...

    char buffer[200]; /* safer length for your buffer */

    printf("Enter your first and last name: ");
    scanf("%[^\n]",buffer);
    /* this will read an entire line including spaces between words */
    ...
  23. Replies
    2
    Views
    1,149

    if the least significant bit of the least...

    if the least significant bit of the least significant byte is set, then it's an odd number. if it isn't set, then it's an even number e.g. isodd = ((value & 1)?ODD:EVEN); where ODD and EVEN are...
  24. Thread: Stack Smashing

    by twiki
    Replies
    7
    Views
    2,020

    Try the -fno-stack-protector option and see what...

    Try the -fno-stack-protector option and see what you come up with

    I doubt a simple string will result in a command being executed though
  25. Replies
    11
    Views
    7,087

    Yeah. ncurses is probably the best option. These...

    Yeah. ncurses is probably the best option. These macros are definitely limited. I've actually got a slightly improved version of this header which should compile on non-unix targets.

    One...
Results 1 to 25 of 32
Page 1 of 2 1 2