Search:

Type: Posts; User: Luciferek

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    37
    Views
    5,339

    ok laserlight so what is the correct syntax for...

    ok laserlight so what is the correct syntax for declaring pointers to arrays and the way to access them?

    http://www.cplusplus.com/doc/tutorial/pointers.html

    under section "Pointers and Arrays"...
  2. Replies
    37
    Views
    5,339

    OK int main() { int v[3]={3,2,3}; ...

    OK


    int main()
    {
    int v[3]={3,2,3};
    int (* b)[3] = &v;
    cout<< b[1];
    cin.get();
    }
  3. Replies
    37
    Views
    5,339

    Man this is confusing...

    Man this is confusing...
  4. Replies
    37
    Views
    5,339

    int main() { int v[3]={3,2,3}; int (*...

    int main()
    {
    int v[3]={3,2,3};
    int (* b)[3] = v;
    cout<< b[1];
    cin.get();
    }

    gives me an error
  5. Replies
    37
    Views
    5,339

    well no... I do not need parentheses for one...

    well no... I do not need parentheses for one dimentional arrays



    int main(void){
    int v[3]={3,2,3};
    int *b=v;
    cout<< b[1];
    cin.get();
    }
  6. Replies
    37
    Views
    5,339

    OK.. I can live with int (*p)[3][2] = x; It...

    OK..
    I can live with

    int (*p)[3][2] = x;
    It is somewhat consistent with other pointer declarations.

    But than again... how do i figure out when do I need parentheses when declaring pointers...
  7. Replies
    118
    Views
    15,235

    So, In other words... There is no real advantage...

    So, In other words... There is no real advantage to using a new and delete keywords except
    that it is accepted as a standard?
    Besides why are compilers picky in what they allow and what they do...
  8. Replies
    118
    Views
    15,235

    illegal huh?

    Could you elaborate on illegal and what do you mean by that?
    If it works, it works... i don't think i'll get arrested!
    Besides, are there standards related to C++ code? Where do i find those?
  9. Replies
    118
    Views
    15,235

    Dynamic memory allocation

    Hey!
    I was reading about dynamic memory allocation, and I don't quite get the purpose of it. It says, you can create pointer to an array you don't know the size
    of yet. Why not create an array...
  10. Replies
    37
    Views
    5,339

    Fight! Fight!

    And again I am furious with C++. There is no way of predicting how to point to something. I would never in my lifetime guess



    int (*)[3][2] p = x;


    that (*)... is that a typecast?

    I...
  11. Replies
    37
    Views
    5,339

    pointers to multidimensional arrays

    hi!
    how would I declare a pointer to point to this array?


    int x[3][3][2]={1,2,3,2,3,4,5,7,9,1,2,3,2,3,4,5,7,9};

    Also is there a way to pass an array with variable dimension idexes to a...
  12. ok I guess the tutorial i am reading is shady, ...

    ok I guess the tutorial i am reading is shady,

    it says that:


    void procedure (int myarray[][3][4])

    is a valid function prototype
    but when I try
  13. multidimensional array as a function argument

    hello!
    I am trying to call a function that has multi dimensional array as one of its arguments. My Dev C++ gives me crap with this code:


    #include <iostream>
    using namespace std;

    void...
  14. Online Resources for Preprocessor Directives

    Does anyone know of a tutorial or a lesson on Preprocessor Directives?
    I looked at MSDN Visual C++ refrence material but it is written in such a way that I barely understand it. I am looking for...
  15. Replies
    21
    Views
    11,114

    Yep... reminescing over the good ole college...

    Yep...
    reminescing over the good ole college days...
    I only wish my proffessors weren't nazis.
  16. Replies
    24
    Views
    4,905

    classes, structs and unions

    Hey
    I was wondering what is the difference between classes unions and structs?
    They all seem to be the same
  17. Replies
    1
    Views
    1,035

    Directives and Macro Resources

    Hello
    I am looking for resources on Directives and Macros. Something like an indepth tutorial or chapter from book dedicated to that topic would be great
    Thank you!
  18. Replies
    6
    Views
    1,292

    Yep that did the trick! But this leads me to...

    Yep that did the trick!
    But this leads me to another bunch of questions.

    Doesn't GetProcAddress function give you just the adress of Out32 ?

    Why do we need to typecast if the pointer is of...
  19. Replies
    6
    Views
    1,292

    ok, but if you try void (*outport)(short...

    ok, but if you try
    void (*outport)(short adress, short value) = (void)GetProcAddres(Dllload, "Out32");
    that doesn't work niether. Is there any other way other than typedef?
  20. Replies
    6
    Views
    1,292

    problem initializing function pointer

    I am trying to create a pointer that would point to Out32 function in inpout32.dll.
    and the following code does not work, can someone give me more insight about
    why it doesnt work?


    #include...
  21. Replies
    11
    Views
    2,736

    How does result = result? I don't really get...

    How does result = result?

    I don't really get operator precedence in this case either;
    if inc_one(1) is a pointer, and pointer is considered a variable
    So it would make more sense to me that *...
  22. Replies
    11
    Views
    2,736

    So in other words, * operator as well as &...

    So in other words, * operator as well as & operator are optional for normal functions and are mandatory for class functions?
    Is * mandatory for class functions? Since a.fooptr(); is wrong?
    Hmm I...
  23. Replies
    11
    Views
    2,736

    Variable pointers and function pointers

    I started studying pointers and i am becoming confused...
    When you have pointer and that pointer has adress of another variable you need to use * derefrencing operator to access the value that is...
  24. Replies
    4
    Views
    1,598

    Thank you for those links, it is what I needed....

    Thank you for those links, it is what I needed. And I have another question about Hinstance. From this tutorial

    What kind of objects can be instances? Could .exe file be the instance? How about...
  25. Replies
    4
    Views
    1,598

    resources on linking to a dll

    Hello,
    I am looking for materials (tutorials, lessons etc) on linking to a dll.
    With code examples & explanations. The code by itself doesn't help me much.

    What is HInstance and what does it...
Results 1 to 25 of 38
Page 1 of 2 1 2