Well, my problem is simpel. I have created an edit Box and want to read it out using the event handler.
The method "getText" returns a "const wchar_t *". And I have never really come across Unicode. So what exactly is wchar_t? Does it sort off replace the string variable? Or is it a kind of char replacement?
do it like this
int i = atoi(stringc(editFieldX->getText()).c_str()); //converts to int
float i = atof(stringc(editFieldX->getText()).c_str()); //converts to float
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
i don't know
maybe <string.h> or <stdio.h> or <conio.h> or <stdlib.h> or <cstdlib>
but i really don't remember
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
stringc seemst so be a class or struct. So it should probably be initialized somewhere or am I mistaken? A quick google for "stringc c++ header" didn't quite bring satisfieng results
stringc is just a static function just like printf or scanf.......do u even have any clue about c++?
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
But:
Google can't tell me what stringc is, the MSDN doesn't have any kind of entry about stringc, cppreference.com doesn't know a function called stringc etc etc
\bomberman\IrrMainmenu.cpp(222) : error C2228: left of '.c_str' must have class/struct/union
.\bomberman\IrrMainmenu.cpp(222) : error C3861: 'stringc': identifier not found
I admit I dont really understand your way of parsing the edit box. I can only tell that a simple copy paste does not quite work ...
Sudi wrote:stringc is just a static function just like printf or scanf.......do u even have any clue about c++?
Do you have
stringc is a Irrlicht-builtin class, better to be used as core::stringc. What you're proposing here is not some static function but a class constructor invocation. You're building an anonymous object which provides a c_str method to convert its contents to a char*. So care for your own business and learn c++
BTW: It's included in irrString.h
I already said i didn't know where it came from....
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Yes, true. But you should try to say it without the attitude of the almighty when not being able to recognize the simplest C++ structure. If you don't know C++ you should not discredit others for it.
Yeah yeah i know.....but i simply missed it......anyways lets stop this.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.