Forum: C
Yesterday, 1:48 PM
|
|
Replies: 4
Views: 69
Re: drawing in C
You could do this using a library such as SDL (Simple Direct Media Layer), which would also make it portable to other platforms:)
|
Forum: Coder's Corner Lounge
Oct 4th, 2008, 2:35 PM
|
|
Replies: 2
Views: 117
Re: FreeBSD
Keep the book you have and go with the latest FreeBSD. The bulk of the information will carry over from 6.0 to 7.0.
|
Forum: C
Sep 25th, 2008, 12:26 AM
|
|
Replies: 7
Views: 309
|
Forum: Assembly
Sep 24th, 2008, 10:47 AM
|
|
Replies: 1
Views: 134
Re: basic problem with string/byte comparison.
What your program is doing is comparing the address of 'var' and 'cmp_var'. Assembly language does not have the facilities to compare byte strings, you need to do it yourself :)
In order to compare...
|
Forum: C
Sep 24th, 2008, 10:37 AM
|
|
Replies: 7
Views: 309
Re: x86 Question
That is correct, the address of the first byte (lower byte in memory) is the address of the word.
Memory in x86 is little-endian, that is, the least significant bytes come first in memory.
If you...
|
Forum: C
Sep 24th, 2008, 7:15 AM
|
|
Replies: 7
Views: 309
Re: x86 Question
Memory under x86 is byte-addressable. You can access the bytes in a word in C by casting it to a char *.
short x = 40;
char *y = (char *)&x;
Then y[0] through y[1] would be the bytes of the word...
|
Forum: Project Ideas
Sep 22nd, 2008, 7:12 PM
|
|
Replies: 6
Views: 203
Re: Physics Project Idea
The falling objects one is a no brainer;)
How about being able to set the trajectory of an object and make it orbit around a bigger object, kinda like the thing they had in MS Encarta 96 if I...
|
Forum: Coder's Corner Lounge
Sep 20th, 2008, 3:20 AM
|
|
Replies: 23
Views: 623
Re: Big-oh questions (help, please?)
The last question is asking, if you have n number of things (elements), how many different ways can they be arranged?
If you had to print all the permutations of 5 characters A,B,C,D, and E, that...
|
Forum: Coder's Corner Lounge
Sep 20th, 2008, 1:25 AM
|
|
Replies: 23
Views: 623
Re: Big-oh questions (help, please?)
All of those seem correct to me, except the last one:
-Printing all permutations of n distinct elements
The number of permutations of n elements is n! (n factorial), making it O(n!)
|
Forum: C
Aug 19th, 2008, 8:50 PM
|
|
Replies: 5
Views: 339
Re: C Code
That big thing that looks like an E, or a sideways W, or a sideays M, maybe even a C, that's the Greek letter Sigma, its used in math to denote summation: http://en.wikipedia.org/wiki/Summation
|
Forum: Coder's Corner Lounge
Aug 13th, 2008, 5:56 PM
|
|
Replies: 4
Views: 291
|
Forum: Coder's Corner Lounge
Aug 2nd, 2008, 2:43 PM
|
|
Replies: 7
Views: 441
|
Forum: Community Introductions
Aug 1st, 2008, 5:56 PM
|
|
Replies: 4
Views: 291
Re: Hello World!
Insurance eh....:angry:
Welcome to the community!
Sounds like you're off to a pretty good start. Have you considered taking any college courses/classes for programming?
|
Forum: Coder's Corner Lounge
May 26th, 2008, 1:35 PM
|
|
Replies: 56
Views: 2,530
Re: Is it right to have your child baptised?
I think parents should also wait and let their children name themselves. Fortunately both those things can be changed. Names can be changed legally, and anyone can denouce their faith.
|
Forum: Project Ideas
May 12th, 2008, 11:52 AM
|
|
Replies: 8
Views: 536
Re: light program
Depends on how you are interfacing with the lights I suppose. I saw someone in my program using Phidgets (http://www.phidgets.com/) with C/C++ to do something similar.
|
Forum: Paid Job Offers
May 9th, 2008, 2:18 PM
|
|
Replies: 19
Views: 1,146
|
Forum: C
May 4th, 2008, 3:18 PM
|
|
Replies: 1
Views: 209
Re: what does undefined reference mean?
The compiler is telling you it doesn't know what IID_IPicture is, it wasn't declared anywhere in the above code. You can fix this by finding out what kind of data IID_IPicture is in your code, (a...
|
Forum: Coder's Corner Lounge
May 3rd, 2008, 1:05 PM
|
|
Replies: 4
Views: 260
|
Forum: C++
Apr 26th, 2008, 7:07 PM
|
|
Replies: 9
Views: 381
|
Forum: Coder's Corner Lounge
Apr 19th, 2008, 12:44 PM
|
|
Replies: 19
Views: 556
Re: To all you college grads?
I'm finishing my first year of software engineering this week, so I'll take a stab at this;
How hard was it?;
None of it was hard. Lots of challenges though, and lots of fun.
How many times did...
|
Forum: Coder's Corner Lounge
Apr 3rd, 2008, 2:05 PM
|
|
Replies: 18
Views: 612
|
Forum: Java
Apr 1st, 2008, 9:51 PM
|
|
Replies: 5
Views: 250
Re: New to programming
A poor mathematical background isn't going to impede you from learning how to write computer programs. A good C/C++ compilers is Visual Studio 2008 Express or CodeBlocks. If you're having trouble...
|
Forum: Coder's Corner Lounge
Apr 1st, 2008, 8:56 PM
|
|
Replies: 14
Views: 580
Re: What is your occupation?
Occupation: College student (software engineering technologist)
Salary: -$5000 and growing (in magnitude)
Big thing I've done in my career.... Today I made a musical instrument out of a joystick and...
|
Forum: C
Mar 23rd, 2008, 11:21 AM
|
|
Replies: 16
Views: 469
Re: arrays??
A 'for' loop is most appropriate for this situation. You will need two of them - a loop within a loop.
|
Forum: Coder's Corner Lounge
Mar 18th, 2008, 3:41 PM
|
|
Replies: 40
Views: 1,359
Re: PC Help Required
It still sounds to me like you simply have a loud hard drive. Does it get noisy when you do disk-heavy things like windows defrag and disk cleanup?
|
Forum: Coder's Corner Lounge
Mar 13th, 2008, 10:26 PM
|
|
Replies: 21
Views: 767
|
Forum: Coder's Corner Lounge
Mar 13th, 2008, 10:02 PM
|
|
Replies: 21
Views: 767
|
Forum: Coder's Corner Lounge
Mar 13th, 2008, 9:25 PM
|
|
Replies: 21
Views: 767
Re: I failed a programming test
Lighten up dude. You're just out of college and starting your career, so I don't really see how not qualifying for one job out of the many that are out there is such a bad thing.
Did you apply to...
|
Forum: Assembly
Mar 13th, 2008, 2:10 PM
|
|
Replies: 8
Views: 580
Re: Deleting chracters
Point to the character in the string you want to remove, replace it with the next character in the string, then move to the next character, replace that one with the one after it, and so on. If the...
|
Forum: Coder's Corner Lounge
Mar 12th, 2008, 8:41 PM
|
|
Replies: 25
Views: 793
|
Forum: C++
Mar 12th, 2008, 8:20 PM
|
|
Replies: 17
Views: 727
|
Forum: C++
Mar 12th, 2008, 6:58 PM
|
|
Replies: 17
Views: 727
Re: Console Game Development
void * is a pointer to anything. It needs to be casted to a datatype to be of any use. Notice that malloc() return void *, this is because all malloc does is allocate bytes, how those bytes are...
|
Forum: C++
Mar 12th, 2008, 6:08 PM
|
|
Replies: 17
Views: 727
Re: Console Game Development
FILE is whats known as an opaque data type. Its actually a struct, but we don't really care whats in it. How files work below the C library level is OS dependent.
Using C, you can create a file...
|
Forum: C
Mar 12th, 2008, 6:00 PM
|
|
Replies: 11
Views: 489
|
Forum: C
Mar 12th, 2008, 5:50 PM
|
|
Replies: 11
Views: 489
Re: Troubleshooting with fread and fopen
FILE *wavfile;
wavfile =fopen("cwav1.wav", "rb");
wavfile =fopen("cwav2.wav", "rb");
wavfile =fopen("cwav3.wav", "rb");
You are re-assigning wavfile twice after you open the...
|
Forum: Coder's Corner Lounge
Mar 12th, 2008, 4:47 PM
|
|
Replies: 25
Views: 793
Re: 500 Ways to Cause An Error
Titaniumdecoy's program may or may not crash depending on stack size, it didn't crash on mine machine:(
language: C
Description: realloc could return NULL and overwrite the original pointer value,...
|
Forum: C
Mar 12th, 2008, 2:47 PM
|
|
Replies: 15
Views: 786
|
Forum: Java
Mar 11th, 2008, 8:50 PM
|
|
Replies: 7
Views: 249
|
Forum: Java
Mar 11th, 2008, 8:01 PM
|
|
Replies: 7
Views: 249
Re: Help why doesnt it work
You're using a signed long integer, which can only represent values from -2^31 to 2^31, use unsigned long to use numbers from 0 to 2^32-1.
|
Forum: Assembly
Mar 10th, 2008, 7:12 PM
|
|
Replies: 4
Views: 455
Re: Flag Question
Flags are just a collection of bits that tell you different things about the current state of the processor. For example, if you do a byte addition and the result is greater than 255, then the carry...
|