Beginners - February 2021 (Page 10)

by bstroe
Swap second digit with penultimate
 
How can i invert the second digit of a number with the penultimate using the mathematical order and powers of 10? Simple solution with while and if (if it's po...
[5 replies] Last: #include <iostream> using namespace std; int main() { long long n... (by lastchance)
by Ch1156
How do I overload the < operator to be able to use class objects with Map container?
 
I'm following the Learncpp site and it has stuff on operator overloading but I cant seem to figure it out for using a class object, I've been trying to figure t...
[4 replies] Last: Thanks guys! (by Ch1156)
How to Enter Compose Name in Prompt
 
Hello! I am compiling in VS, when I type a compose name, for example, "Davis Jones", only the first name is inputted, looks like that spaces between words do ...
[3 replies] Last: Thank so much Keskiverto and Seeplus! I understood. The \P and \Y I fo... (by DanielDeChamps)
Sort An Array of Structure Based on one of It's Values in Alphabetical Order.
 
Hello! I'm trying to sort an array of structure-based one of the structure variable in Alphabetical order.. I want to sort all the rest of the structure data be...
[1 reply] : [quote=Genious28] Hello! I'm trying to sort an array of structure-base... (by MikeyBoy)
What basic course need to start C ++
 
Start with C++. If you are new to programming, start learning with Stroustrup's 'Programming: Principles and Practice Using C++ (second edition)' https://www.in...
[1 reply] : Look at https://www.learncpp.com/ For a book, I'd suggest Beginning C... (by seeplus)
binary tree
 
Found this tutorial code. i cant understand how function inorder() is traversing through binary tree. (i am a beginner, i understand how recursive functions wor...
[10 replies] Last: In the later code it uses the default initialised value for left and r... (by seeplus)
Time as Statement Inside If
 
Hello! I would like to compare two different hours aiming print certain sentences according the current hour, nevertheless my code is always returning Sleep de...
[3 replies] Last: Thank you so much Seeplus and Coder777. I understood the working! Than... (by DanielDeChamps)
by bstroe
Concatenation of 3 integers
 
My code: #include <iostream> using namespace std; int main() { int a, b, c, i=0, p=1; cin >> a >> b >> c; int cb = b; whil...
[6 replies] Last: Thank you! (by bstroe)
A pointer of type char* is so different from that of type int*;
 
A pointer of type char* is so different from that of type int*. Why a pointer of type char* is the content, while a pointer of type int* is a memory address....
[7 replies] Last: To display the address as a pointer, cast it to const void* To disp... (by JLBorges)
First C++ Assignment, HELP!!! Decimal & $ Symbol
 
Hi everyone! I'm new to c++ this is my first assignment, so far I think I did good, i hope! But for my last code I'm suppose to show the results at 2 decima...
[1 reply] : PLEASE learn to use code tags, they make reading and commenting on so... (by George P)
by kmce
copy constructor issue
 
Hello, I am trying to practice class creation and copy/move constructors etc, but having an issue with my copy constructor. Code below. When I am trying to assi...
[6 replies] Last: Thank you. For some reason it was working without the dereference, but... (by kmce)
Vector of queue pointers
 
I am wondering if someone could tell me if it is possible to set up a vector of queue pointers (using STL containers) and how I would go about doing this. I am ...
[11 replies] Last: Thanks everyone, you've given me a lot to research and play around wit... (by FeedMeTacos)
CONVERT TO C++
 
calculate_amount_due ~ get the first number of tickets display “Enter the number of tickets bought – 0 to stop” enter number do while number <> 0 ...
[1 reply] : Show us your attempt. What are you having trouble with? (by Ganado)
Create and Append Data into a New File Based&From Two Data Files. (1,2)
 
Hello! I have a project that is due tonight and I am at the last step.. However, everything I tried has not worked so far. What am I trying to Achieve? We...
[22 replies] Last: Also, using some functions and recognizing that when the "if" part ret... (by dhayden)
Using do while
 
So I need help figuring out why my output isn't correct. I got the number of students to output correctly. I need to figure out why the correct grade isn't show...
[4 replies] Last: If each test is out of 100 (0 - 100), and you have 4 tests, You will h... (by doug4)
How to print all the contents of a file without eof(); or vectors or classes. (1,2)
 
I have a project to submit the day after tomorrow, that is before midnight tomorrow. Before that, our Programming Fundamentals Incharge gave us a brief go-throu...
[20 replies] Last: they are command line arguments. That is, you can type your program's... (by jonnin)
What's the best way to learn C++?
 
I want to know if there are any good tips on the most effective way to learn C++? I have been learning C++ for a couple of months now and I really like it, I `a...
[4 replies] Last: “Not everyone will understand your journey. That’s fine. It’s n... (by closed account z05DSL3A)
What does const pointer mean??? (1,2)
 
I do not understand what a const pointer means. A pointer represents an address in the memory. what does the code " const char * c = "sample text";" means? ...
[21 replies] Last: I saw a comment that change to const was proposed for C standard, but ... (by keskiverto)
Not printing correctly
 
It's not accepting input? #include <iostream> int main() { int sum = 0, value = 0; while (std::cin >> value) sum += value; std::cout << "S...
[7 replies] Last: > Why did it work when I tried what you said? Formatted input ( std:... (by JLBorges)
Need to Refactor the SQL Query to reduce the execution time through CPP
 
The below query execution takes more than two minutes. Using SQL Server. Select lastname, firstname, gender CASE WHEN TableB.orderno is null THEN TableA.E...
[9 replies] Last: so either that pattern is not actually correct, or something is wrong ... (by jonnin)
February 2021 Pages: 1... 89101112
  Archived months: [jan2021] [mar2021]

This is an archived page. To post a new message, go to the current page.