Hi i just wanted to ask whether we cud use #include<string> and declare a data type called 'string' eg. string ch;? and where is "using namespace std" used?
awi123 0 Newbie Poster
Recommended Answers
Jump to PostYes, you can, but you can't use
using namespace std;
, i.e., And you can even do theusing namespace std;
stuff.#include <string> std::string str = "whatever"; class string { public: std::string str; }; string q;
I think :P
That won't work because the compiler will …
All 4 Replies
Alex Edwards 321 Posting Shark
hacker9801 49 Junior Poster
awi123 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.