![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
The Danger of c-style Strings |
Trezker
Member #1,739
December 2001
![]() |
Templated arguments in strings? I have been using strings a lot and I haven't noticed a single templated thing about them, ever. |
BAF
Member #2,981
December 2002
![]() |
I asked the same thing. I guess the other string class has templated arguments, but std::string is just a typedef for basic_string<char>, and basic_string doesn't have templates. |
Neil Black
Member #7,867
October 2006
![]() |
I'm sorry, but I just don't see why this thread was started. Did anyone NOT know that? Excepting maybe a few beginners who don' have much experience?
|
Thomas Fjellstrom
Member #476
June 2000
![]() |
Quote: basic_string doesn't have templates. No, but it IS a template. -- |
BAF
Member #2,981
December 2002
![]() |
So? That doesn't make the "templates are confusing" argument valid. You can happily use std::string and be totally ignorant of templates for the most part (you may be confused by some compiler errors, then again, I've seen way worse errors). |
Neil Black
Member #7,867
October 2006
![]() |
I use std::string, and I have no idea what a template is. I haven't had a problem with it since the last one I asked about here.
|
bamccaig
Member #7,536
July 2006
![]() |
I appreciate the free refreshments. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
BAF
Member #2,981
December 2002
![]() |
Quote: I use std::string, and I have no idea what a template is. I haven't had a problem with it since the last one I asked about here. Hear the evidence for yourself! |
ImLeftFooted
Member #3,935
October 2003
![]() |
Heh, why do threads like this always end in an argument? |
BAF
Member #2,981
December 2002
![]() |
Hmm, I said something about it being a.cc, and expecting a thread not to end up like that. I forgot who sigged it. |
|
1
2
|