Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8357199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:24:24+00:00 2026-06-09T10:24:24+00:00

I started learning strings and string functions (from a book) , I learned functions

  • 0

I started learning strings and string functions (from a book) , I learned functions like strcpy and strcat and strncat..etc

So I started to practice using them in simple programs to get a sense of what they do.

Then I was surprised later that in the book it tells me that i have to use #include <cstring> in order to use all these string functions.

I have tried using string functions more than once without including <cstring> so why?

The only header file i included was <iostream> and yet i was able to use string functions.

Please someone explain to me why the string functions worked without <cstring> and do I need to include it to use string functions, and if no what are the uses of <cstring>;

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T10:24:26+00:00Added an answer on June 9, 2026 at 10:24 am

    First of all, you absolutely need to consider switching to std::string. Manual memory allocation, while being an interesting and sometimes challenging task, should not be a part of your everyday job.

    Having said that, probably the <cstring> was #included by some other header you are using in your project. However it’s better not to depend on the other headers including <cstring> (no one guarantees that they will do always and for every compiler), and include it where appropriate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Started learning algorithms. I understand how to find theta-notation from a 'regular recurrence' like
Just started learning Scheme. I'm using Dr. Racket as my compiler/interpreter. I need some
I started learning REGEX 2 days ago , now id like to make a
I've only just started learning ruby on rails and I would like to create
I have just started learning MVVM. I've made the application from scratch by following
I just started learning using AJAX with Codeigniter. On my view, I have a
I have just started learning about socket programming and learned about winsock and achieved
I started learning Jquery mobile, I followed this http://dev.jtsage.com/jQM-SimpleDialog/demos/string.html . Nothing happens when I
Started learning Wicket after ASP.NET MVC and feel a little bit confused about managing
Just started learning algorithms. So the exercise is to find if statement is always/sometimes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.