Search:

Type: Posts; User: sloppy

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,454

    I was expecting something like "see my avatar"...

    I was expecting something like "see my avatar" :-D
    (ok, I stop posting useless stuff)
  2. wonderful :-D

    wonderful :-D
  3. Replies
    16
    Views
    3,935

    ah ok... :-)

    ah ok... :-)
  4. Replies
    16
    Views
    3,935

    what "PoS" is standing for? I am ignorant

    what "PoS" is standing for? I am ignorant
  5. Replies
    8
    Views
    1,241

    struct OUTPUT_DATA NUM_COST; //NUM_COST is your...

    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
  6. Replies
    8
    Views
    1,241

    mat is an address because it was declared as an...

    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...
  7. Replies
    24
    Views
    2,856

    because %% means % and %d is for "the integer you...

    because %% means % and %d is for "the integer you want to print".
  8. Replies
    10
    Views
    2,371

    yes, sorry, I have this bad habit to read to...

    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...
  9. Replies
    10
    Views
    2,371

    What? You mean that: char a[3]="ab"; is...

    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)
  10. Thread: Problem.

    by sloppy
    Replies
    10
    Views
    887

    it did'n work because: heureptr is an...

    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:

    ...
  11. Thread: Problem.

    by sloppy
    Replies
    10
    Views
    887

    boh... when you have an array of fixed dimension...

    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.

    ...
  12. Thread: Problem.

    by sloppy
    Replies
    10
    Views
    887

    Anyway after fonction() you print the content of...

    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...
  13. Thread: Problem.

    by sloppy
    Replies
    10
    Views
    887

    if you want to do that you should delete the * :...

    if you want to do that you should delete the * :


    heureptr += 6;


    as I add above
  14. Thread: Problem.

    by sloppy
    Replies
    10
    Views
    887

    Sorry, also: heureptr += 6; for(h...

    Sorry, also:



    heureptr += 6;
    for(h = 6; h < 18; h++)
    {
    *heureptr = h;
    heureptr++;
    }
  15. Thread: Problem.

    by sloppy
    Replies
    10
    Views
    887

    I add (change yy and zz in something more...

    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;
  16. Thread: Problem.

    by sloppy
    Replies
    10
    Views
    887

    Is it correct that mat[][] is it not initialized...

    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...
  17. Replies
    2
    Views
    786

    Some editing: #include int...

    Some editing:



    #include <stdio.h>

    int main(int argc, char * argv[])
    {

    int count;
  18. Replies
    11
    Views
    3,708

    this tutorial about kernel programming covers...

    this tutorial about kernel programming covers also managing ISRs and it is quite easy:
    http://www.osdever.net/bkerndev/Docs/title.htm
  19. Replies
    5
    Views
    1,906

    you can do also this way (even if probably is not...

    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...
  20. Replies
    60
    Views
    6,417

    :-o 0^(-3) = 1/(0^3)= 1/0 = indeterminate 0^0...

    :-o

    0^(-3) = 1/(0^3)= 1/0 = indeterminate
    0^0 = indeterminate
  21. Replies
    60
    Views
    6,417

    Just a bit change, considering that 0^(a) has...

    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...
  22. Replies
    60
    Views
    6,417

    reading your code above, with num=0 and pow

    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 /...
  23. Replies
    60
    Views
    6,417

    another thing you may want to consider is the...

    another thing you may want to consider is the case that num=0 (because you cannot do 0^(-3))
  24. Replies
    60
    Views
    6,417

    it does change. An unsigned int cannot be...

    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 ...
  25. Replies
    60
    Views
    6,417

    read comments: unsigned int...

    read comments:


    unsigned int power,base; // delete "unsigned" here.
    int result=1;
    int count=1; // it is completely useless to put =1 here
    ...
Results 1 to 25 of 50
Page 1 of 2 1 2