Search:

Type: Posts; User: debugg

Search: Search took 0.00 seconds.

  1. Replies
    5
    Views
    1,418

    i completed the code in the second post. ...

    i completed the code in the second post.



    static const int data[instruction] ={status_1 : 32,
    status_2 : 192,
    status_3 : 35
    };
  2. Replies
    5
    Views
    1,418

    Sorry i missed one part in it.. Here is the...

    Sorry i missed one part in it.. Here is the complete code:


    typedef enum {
    status_1 = 'h12,
    status_2 = 'h14,
    status_3 = 'h15
    } instruction;

    static const int data[instruction] ={status_1 :...
  3. Replies
    5
    Views
    1,418

    Error: non constant expression

    Hi all,

    I am trying to do the following in C++



    static const int data[code]={status_1 : 32,
    status_2 : 192,
    status_3 : 35
    };
  4. Replies
    9
    Views
    55,517

    Thanks a lot everyone. It worked for me.. :)

    Thanks a lot everyone. It worked for me.. :)
  5. Replies
    9
    Views
    55,517

    well I am still running it as I am running it in...

    well I am still running it as I am running it in a big project but I still didnt know if my how my compiler knows that the array I declared corresponds to the exact value as shown in the user defined...
  6. Replies
    9
    Views
    55,517

    how to create an array of enum data type?

    Hi

    I want to create an array of my own defined data type. Does anyone have idea how to do that: Example
    User defined data type is:



    typedef enum{
    CHIP,
    BOUNDARY,
  7. Replies
    8
    Views
    4,181

    @opply thanks a lot for the reply.. Is there...

    @opply
    thanks a lot for the reply..

    Is there any other way we can write the following line in C++:


    void print_it(string* details, int sizeOfArray)


    I tried to do something like...
  8. Replies
    8
    Views
    4,181

    ok. so let me put it in this way now. ...

    ok. so let me put it in this way now.






    int main();
    {
    string mode1[3] = '{"chip", "boundary", "chain"};
  9. Replies
    8
    Views
    4,181

    I am programming in system verilog.. but the...

    I am programming in system verilog.. but the problem I am getting is similar to C++... passing the string array to function is similar as we do in C++... So my point is that the code is similar to C++
  10. Replies
    8
    Views
    4,181

    passing string array to a function

    Hi
    I am trying to pass the string array to a function print_it(). I get the following error:

    Error: Reference out of bound array word
    Trying to take a reference to an array word with an out of...
Results 1 to 10 of 10