Well, images, xml files, text files, anything is what I'm refering too. How do you embed things into an executable?
Type: Posts; User: Marcos
Well, images, xml files, text files, anything is what I'm refering too. How do you embed things into an executable?
Is it possible to embed resources into executables like in Windows? I've looked through the gcc compiler and I see no mention of this. Is it necessary to use some other tool?
Thanks.
Hello, I'm new to the Windows API and I'm trying to make a dialog based applicaion, so I added a dialog resource which has a frame with the X button on top, the only problem is that when I press the...
I can't beleive this, I have been programming for 4 years and I learn this until know? >_<
In my defense I bearly ever use C >_>
Thanks man, you have made it possible for me to sleep tonight.
#include <stdio.h>
int main()
{
double b;
scanf("%f", &b);
printf("%f\n", b);
system("pause");
Thanks a bunch Daved, as always you are the man.
Especially thanks for the last comment about making sure the destructor was virtual, it got me checking and I discovered that under certain...
I'm having trouble ereasing elements from the ptr_vector, sometimes it crashes my program, here is the method where it happens
void Juego::checkState()
{
Bullet *b;
...
Damn I can't beleive I was being so stupid, the problem was that the rect of each figure was "out of date" when I checked for collision.
Thanks for trying to help anyway, and sorry for wasting...
Ok here is what I'm trying to do now:
void Entity::move(int milis, std::vector<Entity*> entities)
{
int x = m_x, y = m_y;
m_x += (milis*m_dx)/10;
for (int i = 0; i <...
That works fine for x, but what do I do about y? the movement vector can be in any direction.
To detect collision I'm using a rectangle for each entity in the game, but Im having trouble reacting to it in an appropiate way. What I was trying to do was find the smallest distance for the player...
If you use an array you would have to either have a max amount of numbers, or learn to use dynamic memory. You could also use an std::vector<int> and not have to worry about memory, as the other...
Thanks a bunch everyone, especially Daved. I used your first suggestion and it works perfectly.
Here is what I'm trying to do:
Create a Vector of a parent class, and fill it up with different children of that class, then make a loop which cicles through the vector and calls a method from each...
Thanks, Im going to try that.
[edit]
Yep, that did it. Thanks a lot.
Then how do I do it so they dont wait for the user to press enter?
For gettin input without the user hitting enter in a console application.
Thanks in advance.
You mean like this?
gUpKey = gLeftKey = gDownKey = gRightKey = false;
if (GetAsyncKeyState(VK_UP) & SHRT_MAX) gUpKey = true;
else gUpKey = false;
if...
Here is the code Im using right now
if (GetAsyncKeyState(VK_UP) & SHRT_MAX) gUpKey = true;
else gUpKey = false;
if (GetAsyncKeyState(VK_LEFT) & SHRT_MAX) gLeftKey = true;...
I see, :( so there is NO way to access the video memory on XP?
If I used linux (ubuntu) would I be able to directly access the memory?
I really want to be able to use mode13, but for some reason I cant seem to access the video memory at 0xA0000, if I call my plot pixel function the program just exits, here is my plot pixel function:...
Im using dgjpp v2 and it compiles with no errors, it gives me exit code 255 (I have no idea what that means).
But this does nothing, its supposed to draw a pixel and wait for a keypress....
...
CORRECT LINK
Because those are integers.