I found the solution to my error...
I am supposed to use %.1f....not %d
>.<
Type: Posts; User: Iconate
I found the solution to my error...
I am supposed to use %.1f....not %d
>.<
I have zero idea why this is occuring, I have looked at so many examples of pointers and arrays and I just cannot figure this out.
All I am trying to do right now is create an n by m matrix and...
const Target * const animateTarget( const Target * const tar){
...
tar->setValue(something)
....
}
So I am trying to pass an object to a function and access its methods, some of which modify its values. However, I haven't done this before, and I was following this example
Use & to get object...
Are you saying I have to change glMatrixMode to GL_PROJECTION then before I try to put the text in the world?
Hello, I am designing a game in which I want text to be displayed over certain objects to indicate to the user what to do next.
Sadly, when I was messing around a few weeks ago I got text to...
Ahhh, got it to work :D!
Ty anyways, PM me if anyone is interested to know how, but that tutorial basically tells all
Well, I ran this example
OpenGL @ Lighthouse 3D - GLUT Tutorial
and its exactly how I want character to move, but now Im having trouble incorporating it
mhmm, I dont particularly want to invest my time into that, if thats the only option I will, but there are GLUT keystate commands that could just be intertwined to perform the way I want.
I found online, GetAsyncKeyState, and used that, but it still gives me the same problem.
I am working on a simple FPS for school in OpenGL, cpp, and I am having an issue with key inputs being delayed after the first one.
To simplify; When I hold W to move forward, the character takes...
Ah perfect that worked thank you.
Also I DID manage to get it working prior, but with another example I found online...however, for the X and Y coordinate for renderBitmapCharacter, I was using...
After looking into it, I think it has to do with the parameters im passing to the renderBitmapString function, but im not sure how the coordinates are created
I have just recently started working with OpenGL in school and am having trouble getting text to be displayed on the screen. I am not familiar with all the functions yet, this was just a blank...
const char *dayn[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, **days_names = dayn - 1;
Wow I LOVE that bit of code at the end there, thats really helpful, do you mind explaining why its...
Hey! My job is open 11pm - 12am every day!
But thanks guys, that makes sense. Follow up question though, why am I using a pointer for the array? Is it because if I called the array say...
char *colour_names[] = {"RED", "ORANGE", "YELLOW", "GREEN", "BLUE", "INDIGO", "VIOLET"};
.
.
.
printf("sky = %s\n", colour_names[sky]);
*EDIT* just working on this now.....and What I...
Hello, I am currently teaching myself C, and am at a point where I am learning about enumeration. Id really like some help understanding its capabilities. Here in this example I was given.
...
Ah dang, thanks very much, lastly is the display of the address of the word
EDIT :
Ok so Im quite sure that
NODE* MakeNode(char *name)
{
NODE* t;
t=(NODE*)malloc(sizeof(NODE));
My two issues with my program is that; first, When the user is entering their words, the duplicate error message only apears if it is the first word they enter(ie...)
enter a word : bill...
Yes! It works! thank you so much man! I'll have to just think through that correction though so I understand what it was doing :)
So i used
char *temp
...
temp=(char*)malloc(21*sizeof(char));
if (p==NULL)
{
printf("Memory error");
exit(0);
Hey guys thanks very much for your input. My prof does brackets like
if (x) {
...
}
but I see a lot of code on these forums look like the following so I adapt them that way (plus its...
awesome, im taking a look at these now, thanks so much for your help. Also, for some reason in my program the value "2" for N doesn't work, but every other number does...I get a memory allocation...
for (a=N; a>0; a--)
{
for (b=0; b<a; b++)
{
if (strcmp(p[j],p[j+1])>0)
{
strcpy(temp,p[j]);
strcpy(p[j],p[j+1]);
strcpy(p[j+1],temp);
}