how can i can define a text on c++

Recommended Answers

We call them strings.

#include <string>

string someStringObject;
Jump to Post

All 3 Replies

We call them strings.

#include <string>

string someStringObject;

More information is needed. Moschops' answer is legit, but it would help greatly to know exactly what you want to do so that the answer can be tailored to your needs.

Moschops is correct you may use the string library:

include<string>

string identifier;

or you can create dynamic array

dataType* identifier;
identifer = new dataType[the amount of memory needed]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.