Actually some of the tutorials that come with Masm32 as well as the loads of example programs should suffice. Good tutorials are hard to come by these days.
Type: Posts; User: Cooloorful
Actually some of the tutorials that come with Masm32 as well as the loads of example programs should suffice. Good tutorials are hard to come by these days.
It only helps your programming abilities to know how it works, as Sebastiani said. Its analogous to knowing how an automatic transmission works. Sure its a highly complicated piece of equipment that...
HRange really should be a member function, imo.
void Projectile::HRange(void) {
double g = 10;
double XRange;
double Pi = 3.1416;
double CosRadianAngle;
double SinRadianAngle;
I spent some time trying to find whatever library you may be using, friend. I am truly wanting to help you. If I knew more about your program I feel I could perhaps spot the area where things are...
Thanks for the information, robwhit. I was not aware of %zu. Nifty. As for the assembler thing, I am merely pointing out that the reasons behind why your compiler aligns things on word, dword, qword...
Agreed! But whether or not you should use it, you are now informed that it does exist and how to use it.
While I do not disagree with that, I think understanding why it does so is more a matter of fact in a high level language such as C/C++ whereas in assembler its very intuitive and obvious.
Again, a more platform independant way to accomplish the task is to use a union. But since you are asking, #pragma directives are simply directives only specific compilers even listen to. They are...
*sigh* I love how when this topic clicks, all is well in the universe. If kids learned assembler first nowadays I think perhaps it would be more intuitive.
A char is one byte.
void...
A word is 2 bytes. 32-bit systems more often align to a double word (4 bytes). #pragma pack() is pretty common place for overriding the default boundaries. Though I would only do that when you know...
Fair enough, so I assume DrawText() is your function, right? Are you sure your LoadBmp() function is loading the data in correctly? I am thinking tcc is aligning the space you are allocating...
That is actually the main feature you lose out on when you cannot use a switch/case. You can do something like this though.
namespace Case
{
void moveup(void);
void moveback(void);
...
Perhaps you will perhaps you won't. While it may not be similar to the convention you more commonly seem to use, there may be times when you have to use these sort of convoluted types. The typedef...
Good catch, Scarlet7. I guess your (presumeably compiled with debugging options) stack apparently capable of holding 1.75Mb without an issue. As Scarlet7 indicated though 2.25MB is high by any...
That is correct, though not as correct as it could be with
tags. In any event, you should also be aware that you could just as easily do
#include<stdio.h>
#include <stdlib.h>
#include...
^ he had a good point. I am familiar with quite a few libraries but knowledge of libraries is second to knowledge of the fact that assuming what libraries someone is using is a fatal trap. So humor...
576kb isn't a lot of RAM, but it is kind of a lot when you are considering the stack sizes of most systems. There is no hard and fast rule for when to allocate memory or when to just use the stack....
The way random numbers are physically generated varies from system to system. Are you getting numbers that are not random enough, perhaps? Prelude has some interesting articles that may help you...
576kb is a bit much there, sport. Use the heap, as suggested by bithub, but also you be able to do whatever you are doing another way. Though I could be wrong....
typedef float[256][256][9]...
Edit: Ooops! my bad.
for (j = 0; j <= imageinfo.bwidth * imageinfo.bheight - 1; j++)
{
fprintf(imsnap, "%d ", (picture+j)->red);
fprintf(imsnap, "%d ", (picture+j)->green);
fprintf(imsnap,...
I spent a few hours of time and drank like three pots of coffee but I think I have developed the ultimate 8-puzzle problem which has bar-none the fastest solve time of any algorithm I have studied...
True dat, ok its becoming overly convoluted even bothering with the first way. Well... both are overly convoluted, but the first method exceeds even my usual way of doing it. Fun is fun and all, but...
Perhaps post the rest of your code?
There, now it doesn't ;-)