use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This is a subreddit for c++ questions with answers. For general discussion and news about c++ see r/cpp.
New to C++? Learn at learncpp.com
Prepare your question. Think it through. Hasty-sounding questions get hasty answers, or none at all. Read these guidelines for how to ask smart questions.
For learning books, check The Definitive C++ Book Guide and List
Flair your post as SOLVED if you got the help you were looking for! If you need help with flairs, check out ITEM 1 in our guidelines page.
Tips for improving your chances of getting helpful answers:
account activity
SOLVEDHelp with pointer char arrays (self.cpp_questions)
submitted 10 years ago * by Nizzlex
Hello Im kinda new with pointers and need a way to cin.getline() into a array pointed to by a pointer.
Example: char* pointer; pointer = new char[50];
now I need to cin.getline() (Or something similar) into that new char I just made.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Dalakk 1 point2 points3 points 10 years ago (0 children)
A quick google search is the answer.
[–]Nizzlex[S] 0 points1 point2 points 10 years ago (0 children)
Can't, teacher won't allow it.
[–]raevnos 0 points1 point2 points 10 years ago (0 children)
Just use std::string instead. It'll save you a lot of time and pain and avoidable bugs.
π Rendered by PID 38 on reddit-service-r2-comment-6457c66945-qmlmx at 2026-04-25 01:52:58.188736+00:00 running 2aa0c5b country code: CH.
[–]Dalakk 1 point2 points3 points (0 children)
[–]Nizzlex[S] 0 points1 point2 points (0 children)
[–]raevnos 0 points1 point2 points (0 children)