Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Showing results 1 to 40 of 500
Search took 0.30 seconds.
Search: Posts Made By: Benoit
Forum: C Yesterday, 1:48 PM
Replies: 4
Views: 69
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
Re: x86 Question

That is correct.:)
Forum: Assembly Sep 24th, 2008, 10:47 AM
Replies: 1
Views: 134
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
Re: computer makes annoying noises

Its most likely a fan speeding up to remove excess heat. Have you opened up your computer and made sure its free of dust?
Forum: Coder's Corner Lounge Aug 2nd, 2008, 2:43 PM
Replies: 7
Views: 441
Posted By Benoit
Re: Die Hard 4 Movie.. bout fire sale.... is it possible?

Firewall (Harrison Ford) is another one if you're looking for movies where Hollywood butchers technology.

Also this is kinda old, but there was a sighting of the Blowfish cipher on the TV series 24:...
Forum: Community Introductions Aug 1st, 2008, 5:56 PM
Replies: 4
Views: 291
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
Re: $$$ Need C programmer for Operating Systems programs

What platform must these be programmed for? *nix, windows?
Forum: C May 4th, 2008, 3:18 PM
Replies: 1
Views: 209
Posted By Benoit
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
Posted By Benoit
Re: free peer to peer file sharing

Even simpler would be to set up an FTP server that everyone on your network has access too.
Forum: C++ Apr 26th, 2008, 7:07 PM
Replies: 9
Views: 381
Posted By Benoit
Re: Returning to the main function from another

In that code snipper, an integer value is being returned. I think Soulstorm was referring to returning a chunk of data that can be executed somehow.
Forum: Coder's Corner Lounge Apr 19th, 2008, 12:44 PM
Replies: 19
Views: 556
Posted By Benoit
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
Posted By Benoit
Re: Thank-you PFO!

Congrats! :) Make Canada proud!
Forum: Java Apr 1st, 2008, 9:51 PM
Replies: 5
Views: 250
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
Re: I failed a programming test

And you can't really "learn" a programming language in 30 minutes.
Forum: Coder's Corner Lounge Mar 13th, 2008, 10:02 PM
Replies: 21
Views: 767
Posted By Benoit
Re: I failed a programming test

Well, with that kind of attitude:-/....
Forum: Coder's Corner Lounge Mar 13th, 2008, 9:25 PM
Replies: 21
Views: 767
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
Re: 500 Ways to Cause An Error

9)


char string[32];

gets(string);
Forum: C++ Mar 12th, 2008, 8:20 PM
Replies: 17
Views: 727
Posted By Benoit
Re: Console Game Development

According to the color_set manual page,
Forum: C++ Mar 12th, 2008, 6:58 PM
Replies: 17
Views: 727
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
Re: Troubleshooting with fread and fopen

Beat me to the punch!


if(wavfile ==NULL)|| if(wavfile1== NULL)|| if(wavfile ==NULL)


I think you mean something like this:
Forum: C Mar 12th, 2008, 5:50 PM
Replies: 11
Views: 489
Posted By Benoit
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
Posted By Benoit
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
Posted By Benoit
Re: Causing a Seg Fault on Purpose

Your code won't cause a seg fault because argv is pushed onto the stack, which is a part of memory your program can access.
Forum: Java Mar 11th, 2008, 8:50 PM
Replies: 7
Views: 249
Posted By Benoit
Re: Help why doesnt it work

what???:scared:

Disregard my last post, OP:$
Forum: Java Mar 11th, 2008, 8:01 PM
Replies: 7
Views: 249
Posted By Benoit
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
Posted By Benoit
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...
Showing results 1 to 40 of 500

 
Forum Jump



DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:50 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC