F
F
fastkulob2018-12-14 12:08:06
C++ / C#
fastkulob, 2018-12-14 12:08:06

How to create a string data type in C?

Hi, I just started programming in C. As you know, in C there is no concept of a string. In C, this is an array of characters. Where to download a ready-made library or how to create this type yourself. I downloaded the CS50 library like it should have been there but it gives an error. If possible, please answer 2 questions where to download the library, where is the string and how to create it yourself.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2018-12-14
@sergey-gornostaev

First you need to decide what language you are talking about. You have C++ in the tags and it has std::string, but judging by the title and text, it’s about C. If, nevertheless, C and you lack those functions for working with strings that are listed in the string.h header file , then you can look at GLib for example.

C
CityCat4, 2018-12-14
@CityCat4

C is a low-level language, there are no such things in it. To work with strings, there is string.h

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question