Omnimaga > Nspire I/O
Nspire I/O - Now with C++ support
compu:
Yup. I tried it with another approach without multiple inheritance and for now, everything seems to work more or less :P
Eiyeron:
Nice Juju, that can make me go back to nSpire! :p
Silversircel:
Hi ,
every time i pass some variables to nspireio the programm crahes if i try to execute it.
I've no idea whats wrong.
I basicely only modified the exampel to display a cstring and a string. but it doesn't
work...
The programm crahes if i pass the variables with << operator.
--- Code: ---#include <nspireio/console.hpp>
#include <nspireio/uart.hpp>
#include <string.h>
#include <string>
#include <iostream>
#ifndef NIO_TEST_UART
#define NIO_TEST_UART 0
#endif
using namespace std;
using namespace nio;
int main(void)
{
clrscr();
#if NIO_TEST_UART == 1
nio::uart u;
#endif
nio::console c;
int num = 123;
char cString[] = "Test";
string cppString = "Text";
c.foreground_color(COLOR_BLACK);
c << cString << endl;
c << cppString.c_str() << endl;
wait_key_pressed();
return 0;
}
--- End code ---
Does anyone have a clue?
Thanks
ajorians:
Hi Silversircel,
There isn't a port of the Standard library for the calculator. Here is a link to the syscalls: http://hackspire.unsads.com/wiki/index.php/Syscalls
I tend to use the char pointer (char*) and strcpy, strcat, etc. Hope that helps!
Legimet:
Silversircel doesn't use the C standard library in his/her program.
Also, there's newlib, and many of the functions in it work.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version