Programming Forums
User Name Password Register
 

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

Showing results 1 to 22 of 22
Search took 0.01 seconds.
Search: Posts Made By: Mcoy
Forum: Coder's Corner Lounge May 23rd, 2008, 11:44 AM
Replies: 23
Views: 805
Posted By Mcoy
Re: Free will or Predestination?

Fate.
Lectric Pharaoh explained it well with the dice. Jimbo's life is a bunch of chemical reactions is exactly how I've thought of it ever since I began 'thinking about this.
Whatever 'choices' we...
Forum: Existing Project Development Oct 29th, 2007, 10:23 AM
Replies: 1
Views: 317
Posted By Mcoy
Cheap TrackIr?

I remember a post in these forums at one time describing someone's efforts to code an app that would use a webcam to track the movement a person's forehead, using a dot stuck to their head. I can't...
Forum: C++ May 7th, 2007, 10:03 PM
Replies: 10
Views: 232
Posted By Mcoy
I've been learning OpenGl for the past week and...

I've been learning OpenGl for the past week and just a few days ago I had to do this with the GLUT library. My solution is fairly brutish but it worked.

Anytime the Keyboard callback function is...
Forum: C++ Mar 9th, 2007, 10:31 PM
Replies: 5
Views: 185
Posted By Mcoy
Problem Solved! Sorry for the confusing layout of...

Problem Solved! Sorry for the confusing layout of my question.

My first mistake was not using
SDL_Surface *screen = new SDL_Surface
SDL_Surface *back = new SDL_Surface
to use dynamic...
Forum: C++ Mar 9th, 2007, 10:00 PM
Replies: 5
Views: 185
Posted By Mcoy
The pointers screen and back are initialized to...

The pointers screen and back are initialized to point to an SDL_Surface object when I declare them. They "point" to an SDL_Surface somewhere in dynamic memory. When I pass them to Init_Engine,...
Forum: C++ Mar 9th, 2007, 5:44 PM
Replies: 5
Views: 185
Posted By Mcoy
Trouble with Passing Pointers to a Function.

I've started working with the SDL library a couple days ago. I am writing code to take a bitmap file and display it in a 640x480 window.

The image is called "bg.bmp" (for background)

To draw things...
Forum: C++ Feb 24th, 2007, 9:23 PM
Replies: 6
Views: 246
Posted By Mcoy
I tried messing around with the code again and it...

I tried messing around with the code again and it turns out using StrToInt.clear() works after all. Must have been a typo somewhere in the code.

What do you mean by "documentation"? Is there...
Forum: C++ Feb 24th, 2007, 4:33 PM
Replies: 6
Views: 246
Posted By Mcoy
I forgot to mention that I had tried...

I forgot to mention that I had tried StrToInt.clear(), then StrToInt.str("") after it was read. It did not change the result :confused: .
I am not very experienced in c++ and many guides on the STL...
Forum: C++ Feb 24th, 2007, 2:37 PM
Replies: 6
Views: 246
Posted By Mcoy
How to reset a stringstream object?

I am trying to write code that will take a string of 4 numbers separated by 3 spaces and put them into two integer arrays representing the x and y values of two coordinates. ie:
INPUT:
0 0 4...
Forum: C++ Nov 13th, 2006, 8:09 PM
Replies: 3
Views: 129
Posted By Mcoy
About atoi function and const chars...

string temp;
char temp2[3];
int num_of_values;

getline (myfile,temp);

for(int i(0); i < 3; i++)
{
temp2[i] = temp[i];
}
Forum: C++ Apr 4th, 2006, 8:23 PM
Replies: 10
Views: 328
Posted By Mcoy
I did search the forums actually, and I only...

I did search the forums actually, and I only looked briefly but there wasn't anything...Anyway, I had
figured out to compile a Win32 console app, but Im really just confused by the different terms...
Forum: C++ Apr 4th, 2006, 2:39 PM
Replies: 10
Views: 328
Posted By Mcoy
Visual C++

I have been learning c++ with Dev-cpp for some time and I recently attempted using Visual C++ (Express Edition). Visual C++ seems far more complicated. In Dev-cpp all I had to do to compile a source...
Forum: C++ Mar 16th, 2006, 8:42 PM
Replies: 13
Views: 406
Posted By Mcoy
Yeah I know it sounds stupid, but you'd think itd...

Yeah I know it sounds stupid, but you'd think itd be one of the first things you learn.
Forum: C++ Mar 16th, 2006, 8:26 PM
Replies: 13
Views: 406
Posted By Mcoy
Good thing to know! Could have messed me up later...

Good thing to know! Could have messed me up later on. I've been practicing c++ for a good couple weeks and never knew that....
Forum: C++ Mar 16th, 2006, 8:12 PM
Replies: 13
Views: 406
Posted By Mcoy
C++ strange arithmetic?

Why is it that when I add two integers values(5 and 2),divide them by two and assign the result to a float value,
that the float value refuses to have decimals?
ex:

#include <iostream>
using...
Forum: C++ Mar 14th, 2006, 7:35 PM
Replies: 5
Views: 269
Posted By Mcoy
for(int i=0; i < (word.length()); i++){ ...

for(int i=0; i < (word.length()); i++){
permutation += *(pchar + i);
cout << permutation << endl;
}
This loop asigns the new values to the...
Forum: C++ Mar 14th, 2006, 7:13 PM
Replies: 5
Views: 269
Posted By Mcoy
Permutation

Im back with another char problem. :mad:
I wrote a program that takes a string that the user inputs in a console, and finds all the permutations for it. The thinking is if I move one letter from...
Forum: C++ Mar 12th, 2006, 8:43 PM
Replies: 5
Views: 202
Posted By Mcoy
My bad, I copied code from the CD and wrote out...

My bad, I copied code from the CD and wrote out that list from the book, they use slightly different code.

I removed the (char) from the code because I thought that it allready contained chars,...
Forum: C++ Mar 12th, 2006, 7:17 PM
Replies: 5
Views: 202
Posted By Mcoy
Pointers to objects, dynamic memory...

I am reading the book C++ programming for the absolute beginer and have made my way to the end of the chapter on advanced data types.
The following is code for a simple tic tac toe game with two...
Forum: Coder's Corner Lounge Mar 3rd, 2006, 9:17 PM
Replies: 1,035
Views: 17,152
Posted By Mcoy
cake earphones or speakers?

cake

earphones or speakers?
Forum: C++ Mar 2nd, 2006, 6:42 PM
Replies: 3
Views: 203
Posted By Mcoy
Thanks, I guess I could have figured it out by...

Thanks, I guess I could have figured it out by trying code like that, but I wanted to go to bed by the time I came to that problem :o .
'fred[2]' was indeed a valid index of 'bob[]', but it still...
Forum: C++ Mar 1st, 2006, 9:10 PM
Replies: 3
Views: 203
Posted By Mcoy
Getting values of (non-dynamic) arrays...

Is a statement like:a = bob[fred[2]];
valide in c++?(Bob and Fred are two different arrays.)

I know that something like a = bob[bob[2]]; is valid but a program of mine crashes when I combine two...
Showing results 1 to 22 of 22

 
Forum Jump



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

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