Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About rbairos

  • Rank
  1. Hi All. This is very frustrating: { int i = 5; float f; f = i; } causes: mainloop.c mainloop.c(404): error: can't convert 'signed int' to 'float' mainloop.c(404:4): error: failed to generate expression If I try: f = (float)i; results in: mainloop.c mainloop.c(404:13): internal error: can't assign operand to temp var mainloop.c(404:6): error: failed to generate expression mainloop.c(404:6): error: invalid operand '(float)i' mainloop.c(404:4): error: failed to generate expression Any help appreciated.
  2. Wow, I just spent a week pinpointing a similar bug. Here it is, if it sheds any light. In a nutshell, all four methods are overwriting the first byte of the array, instead of writing into first, second, third, fourth. class foo { public: char *first() { return (char *)&data[0]; } char *second() { return (char *)&data[1]; } char *third() { return (char *)&data[2]; } char *fourth() { return (char *)&data[3]; } char *getData() { return data; } private: char data[4]; }; void main() { class foo f; *f.first() = 1; // stuffs data[0] *f.second() = 2; /
  3. Hi Sorry, Ive searched the forums, and not entirely sure on the answer. Does anyone which endian Boost C++ uses for the PIC18F25J10 ? Given the following code: ------------------------------ union{ unsigned long four; unsigned char one[4]; }test; test.four = 0x44332211; --------------------------------- Ive deteremined: one[0] = 0x11; one[1] = 0x22; one[2] = 0x33; one[3] = 0x44; So, this means Little Endian correct? (sorry Im just juggling so many small details on this project, this type of question trips me up). Thanks, Rob.
  4. Hi guys. Porting some code, and coming across several small changes I had to make in order to make it compile. Thought I'd list one or two here and see if they are known limitations, etc. Cheers Rob issue#1 doesn't work: Client::Client(char s) : _sock(s) { } works: Client::Client(char s) { _sock = s; }
  5. Hi Dave. I just downloaded the C++ compiler and noticed it did not have the PIC16F1825 as advertised. After much head scratching, I realized I had to install the above zip file. Why not roll it into the current installation? (Also, when I use the project Wizard, I only have a choice of 4 or 5 target devices in the pulldown menu instead of the full list, not sure why.) Cheers, Rob.
  • Create New...