Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Changing members of struct

$
0
0

When I debug this, the members of CharQue will not change while stepping through main().  Why is it?

#include <msp430.h>

struct CharQue{
   int start;
   int end;
   char buffer[10];
};

struct CharQue bff = {4,9};

int main(void) {

  WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer

  bff.start=8;
  bff.end=5;

  bff.start=0;
  bff.end=1;



  for(;;){
    bff.buffer[bff.end] = 'A'+bff.end;
    bff.end++;
    bff.start++;

  }

return 0;
}


My target is MSP430FR5739 using CCS5.3


Viewing all articles
Browse latest Browse all 262198

Trending Articles



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