123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|664|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> std::string

Mon, 13 Nov 2017, 05:11
Jayenkai
For the record.. ... FUCKING STRINGS....
Mon, 13 Nov 2017, 05:11
Jayenkai
Having to go through and replace a lot of Char* s with std::string s, today.
Messy. Really bloody messy.
I hate that putting "std::string" EVERYWHERE is seen as "Normal" in the world of C.

-=-=-
''Load, Next List!''
Mon, 13 Nov 2017, 05:27
Dabz

using namespace std;


When your building stuff from the ground up, with very little in regards to importing other users work/libs, that's the kiddy, but, to be sure, it is recommended to do what your doing...

Though, could you not kick the preprocessor in and define std::string as one of your own, something like:-

#DEFINE FWSTR std::string

as in F[rame]W[ork]STR[ing]

Dabz

-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Mon, 13 Nov 2017, 05:34
Jayenkai
Yeah, I read enough fussy complaints about people not stringently using std::string that I decided not to attempt to do without it.
After all, I'm really aiming for portability, here.

.. Of course, you're screwed if your particular C++ doesn't support std::strings, but other than that..

..

*cries*
My lovely clean code!!!!

-=-=-
''Load, Next List!''
Mon, 13 Nov 2017, 06:00
Jayenkai
Them : "No, it's great, 'cos C++ LOVES std::strings!"

Me : "Hey, all these STRING FUNCTIONS don't actually work with std::strings, and prefer char arrays..."

Them : ....


..
"Yeah, but it's cool 'cos std::strings!!!"

-=-=-
''Load, Next List!''
Mon, 13 Nov 2017, 06:16
Jayenkai


AAAACH!!!!!

-=-=-
''Load, Next List!''
Mon, 13 Nov 2017, 06:18
TomToad


Assuming that Game.Hex returns a std::string
Mon, 13 Nov 2017, 06:24
Jayenkai
Eeeeuuuwwww...

<< and >> should be for bitshifting, and no more!!!

-=-=-
''Load, Next List!''
Mon, 13 Nov 2017, 06:29
Dabz
That's overloading for ya!

Dabz
Mon, 13 Nov 2017, 06:37
TomToad
It is bitshifting. It's shifting the bits of text to the console
Mon, 13 Nov 2017, 06:39
Jayenkai


AARGGHH!!!!!!!

-=-=-
''Load, Next List!''
Mon, 13 Nov 2017, 15:18
HoboBen
I know you're probably all settled with your framework now buuuuuutttt

OpenAL and GLFW3 both work with plain C, minus the plus plus bit! Much simpler!

-=-=-
blog | work | code | more code
Mon, 13 Nov 2017, 15:28
Jayenkai
Too late now! Onward and upward!!!