Search:

Type: Posts; User: zephon

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    3,039

    Yes that's because the same IDE (Visual C++ 2005...

    Yes that's because the same IDE (Visual C++ 2005 known also as Visual C++ 8.0) alows to compile your code as C or as C++. Also the compiler is invoked indirectly using a command-line interface that...
  2. Replies
    6
    Views
    3,039

    No, it won't compile in C, at least not in Visual...

    No, it won't compile in C, at least not in Visual C++ 2005.

    In C you can write

    typedef struct {
    int a;
    }some_struct; to be able to use
    some_struct n;

    but if I write
  3. Replies
    6
    Views
    3,039

    Explicit initialization of class members

    struct some_struct{
    int a;
    };
    some_struct n = {};

    n.a will be 0;

    I know this braces form of initialization is inherited from C and is supported for compatibility with C programs, but...
  4. I've tried it and it made no difference if the...

    I've tried it and it made no difference if the first array was bigger than 2. If the first array was of size 1 or 2, then the second one would get random values. So I guess my assumption was correct....
  5. With -ansi and -pedantic(MinGW) the value of *pi...

    With -ansi and -pedantic(MinGW) the value of *pi in
    int *pi = new int; is 0. Then I've tried the following code


    int main()
    {
    const int arr_size=2;
    int *px = new int[arr_size];
    ...
  6. I also get 0 0 13 with MinGW and with Digital...

    I also get 0 0 13 with MinGW and with Digital Mars compiler.

    For the array initialization I get the following compilation error with Digital Mars Compiler

    int *px = new int[10]();
    ...
  7. Value initialization using an empty pair of parentheses

    I've read in a book that "we can value-initialize the elements by following the array size by an empty pair of parentheses:"

    int *pia = new int[10] ()

    Also the same book states that the...
  8. Replies
    2
    Views
    1,407

    You should try searching for Pic microcontroller...

    You should try searching for Pic microcontroller projects. Maybe you can find one that resembles your need.
  9. Replies
    3
    Views
    2,338

    Writing in text mode was the problem indeed. Now...

    Writing in text mode was the problem indeed. Now it's ok, the files are indentical as expected. Thanks vart.

    I know I should check the number of bytes read and written. That's the way I wrote the...
  10. Replies
    3
    Views
    2,338

    Read write problem

    I try to read from a file and to write to another file an arbitrary number of bytes



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

    {
    FILE * pFileR;
    FILE * pFileW;
    char buffer[32];
Results 1 to 10 of 10