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");...
Type: Posts; User: twiki
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");...
Try using getchar() instead of scanf
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
You're welcome... Hope the coding goes well from here on out!
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...
Try including <string.h> and <stdlib.h> or <memory> for c++ version in the namespace std
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...
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...
#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...
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...
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...
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...
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 */
...
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...
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
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...