I was expecting something like "see my avatar" :-D
(ok, I stop posting useless stuff)
Type: Posts; User: sloppy
I was expecting something like "see my avatar" :-D
(ok, I stop posting useless stuff)
wonderful :-D
ah ok... :-)
what "PoS" is standing for? I am ignorant
struct OUTPUT_DATA NUM_COST; //NUM_COST is your object
struct OUTPUT_DATA * addr = &NUM_COST;
//now addr points to (and is) the address of NUM_COST
mat is an address because it was declared as an array...
char a = ' w'
in this case a is not the address of the memory where there is 'w' but it is the value itself.
instead &a is that...
because %% means % and %d is for "the integer you want to print".
yes, sorry, I have this bad habit to read to fast... I had understood the exact contrary.
well you can write your own libc functions without linking to the c library, even if of course something...
What? You mean that:
char a[3]="ab";
is not standard? I didn't know... And what happens if you do not have a C library? (nor malloc)
it did'n work because:
heureptr is an address (say a 32-bit unsigned integer in 32-bit architectures)
*heureptr is the value inside that particular address of memory.
for example:
...
boh... when you have an array of fixed dimension you can set all elements like this:
char data[6]={0,0,0,0,0,0};
but if you do it in a matrix 12x24 the code results a bit heavy to read.
...
Anyway after fonction() you print the content of mat[][]. If you do not initialize each element to zero (or to what you want) there could be "garbage" in the element itself. That is why you get...
if you want to do that you should delete the * :
heureptr += 6;
as I add above
Sorry, also:
heureptr += 6;
for(h = 6; h < 18; h++)
{
*heureptr = h;
heureptr++;
}
I add (change yy and zz in something more eyecandy):
int yy,zz;
for(yy=0;yy<12;yy++)
for(zz=0;zz<24;zz++)
mat[yy][zz]=0;
Is it correct that mat[][] is it not initialized to anything? (It's late and I am tired :-) so I am not sure, but it seems that
*heureptr += 6; adds 6 to some mat[i][j] that is not inizialized...
Some editing:
#include <stdio.h>
int main(int argc, char * argv[])
{
int count;
this tutorial about kernel programming covers also managing ISRs and it is quite easy:
http://www.osdever.net/bkerndev/Docs/title.htm
you can do also this way (even if probably is not really beautiful)
create a program that reads a file as binary (can be an image an mp3) and byte per byte translate it to text in hex form in an...
:-o
0^(-3) = 1/(0^3)= 1/0 = indeterminate
0^0 = indeterminate
Just a bit change, considering that 0^(a) has sense for a > 0 (and it's not 0)
int main()
{
double num;
double onum;
double pow;
cout << "Enter number: ";
cin >> num;
cout << "Enter...
reading your code above, with num=0 and pow<0 say pow= -3 you get:
else if (pow < 0) // -3<0
{
onum = num; // onum = 0
for (; pow < 1; pow++)
{
num /= onum; // num = 0 /...
another thing you may want to consider is the case that num=0 (because you cannot do 0^(-3))
it does change. An unsigned int cannot be negative. Maybe to simplify your problem you can leave power unsigned and base signed.
the problem is (assuming "power" is an integer) that ...
read comments:
unsigned int power,base; // delete "unsigned" here.
int result=1;
int count=1; // it is completely useless to put =1 here
...