Forum: C Sep 8th, 2008 |
| Replies: 7 Views: 1,169 Gee, I totally forgot about that, thanks, Ancient Dragon. I was trying to make it too difficult. |
Forum: C Sep 6th, 2008 |
| Replies: 7 Views: 1,169 I knew that you could just use a normal char array, but I didn't know you couldn't modify a char array pointed to by a pointer. If you type *ptr, you can access the value at the variable the pointer... |
Forum: C Sep 6th, 2008 |
| Replies: 7 Views: 1,169 In this example, 10 is the index of a char array ch, but I don't want to modify the tenth element. Also, ch is a single char. I don't quite understand you mean here. |
Forum: C Sep 6th, 2008 |
| Replies: 7 Views: 1,169 So I'm messing with some code, trying to get more familiar with string functions, and I stumbled into an apparent error on my part. Here is my code:
#include <stdio.h>
#include <string.h>
int... |
Forum: C Sep 2nd, 2008 |
| Replies: 17 Views: 10,332 Sorry, I just now found your reply. I haven't messed with this program for a long time. In fact, I forgot all about it. I've moved on to working with (as much as possible) ANSI standard C, and now I... |
Forum: C Mar 24th, 2008 |
| Replies: 9 Views: 1,397 Could you provide us with all your code? |
Forum: C Mar 24th, 2008 |
| Replies: 2 Views: 400 I solved it. argc counts the program call as the first argument, which is argument 0. If there is an argument supplied to the program on the command line, that is argument 1. I didn't take this into... |
Forum: C Mar 24th, 2008 |
| Replies: 2 Views: 400 Another batch of code I whipped up. Surprisingly, gcc doesn't seem to mind the wierd declaration of the char array...and this program was able to read arguments on the command line, but was unable to... |
Forum: C Mar 24th, 2008 |
| Replies: 2 Views: 400 I'm trying to figure out how to parse options such as -h out of the arguments passed on the command line when the program is called. Here is my code so far. I compiled it with gcc -Wall -o options... |
Forum: C Mar 23rd, 2008 |
| Replies: 2 Views: 619 As for platform, the one I am presently concerned with is UNIX/Linux. I have found out that the GNU C LIbrary contains a library for dealing with sockets.
To quote from the link I am providing as... |
Forum: C Mar 23rd, 2008 |
| Replies: 2 Views: 619 I don't know about C, but I read that C++ doesn't have any "standard" library for networking stuff. I was wondering which libraries for C were more popular or higher acclaimed. And who better to ask... |
Forum: C Oct 11th, 2006 |
| Replies: 13 Views: 8,084 Hello,
I am trying to output simple sound through the internal computer speaker. Is there a way to output certain sounds and control the frequency of the sound as well as the time it lasts?
... |
Forum: C Sep 23rd, 2006 |
| Replies: 17 Views: 10,332 What is the top decimal value that kbhit() catches when you hit a key? I didn't know about kbhit. So I coded the entire thing from scratch. It works. But the UP arrow key for example is " H", that... |
Forum: C Sep 23rd, 2006 |
| Replies: 17 Views: 10,332 Oh and in regards to the title of my file, that is not how many programs I attempted before I figured it out, lol! It is the amount of programs I have compiled since Monday. Just noticed that I... |
Forum: C Sep 23rd, 2006 |
| Replies: 17 Views: 10,332 Oops, I forgot to delete the #define ARROW_KEY_NONE and #define ARROW_KEY_POSSIBLE constant declarations. This was when I was fooling around trying to figure it out, and just forgot to delete it.
... |
Forum: C Sep 23rd, 2006 |
| Replies: 17 Views: 10,332 This compiled with no errors on Borland C++ 5 and gcc. So this should compile on yours.
/******************************* 0026.c *******************************/
/* ... |
Forum: C Sep 23rd, 2006 |
| Replies: 17 Views: 10,332 Ok let me whip up a simple program to demonstrate it. No point in pasting all my hundreds of lines of code for one trivial matter.
It will take me a little while to make a simple program but I... |
Forum: C Sep 22nd, 2006 |
| Replies: 17 Views: 10,332 Nevermind, I figured it out.
But thanks anyway :)
Diode |
Forum: C Sep 21st, 2006 |
| Replies: 17 Views: 10,332 Oops, I quickly realized that I was inaccurate in stating that the UP arrow key contained 4 characters. I forgot about that line of code I supplied which includes spaces and values.
The UP arrow... |
Forum: C Sep 21st, 2006 |
| Replies: 17 Views: 10,332 I know they don't have standard ASCII values, but how do you check for them?
I am making a command prompt-type interface for a text-based RPG a friend and I are making, and I would like to be... |