Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Can I not use the Condition Operator to assign an array to a pointer?

$
0
0
Can I not use the Condition Operator to assign an array to a pointer...

Now I know there is many ways around my problem, but I'm wandering if its because I'm trying to assign an array to a pointer using the Condition Operator which is giving me problems.



string *ptr = (SIZE == SIZES ? BoardS : (SIZE == SIZEM ? BoardM : BoardL));


//BoardS, BoardM, and BoardL, are all predefined arrays of strings.

The DOS application runs but as soon as I get to what seems to be this branch of the program, the DOS application terminates. Throwing me a message saying that "THIS APPLICATION HAS REQUESTED, THE RUNTIME TO TERMINATE IT IN AN UNUSUAL WAY"

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>