Beginners - March 2019 (Page 3)

String Object clarification
 
Hello, I am kinda new to understanding string objects and I am not sure if I actually do understand them. So here's my questions, are strings simply c strings b...
[2 replies] Last: From http://www.cplusplus.com/reference/string/string/ Strings are ob... (by keskiverto)
by cash
HELP
 
My program is to write a c++ prgoram initializes an integer vector v of size SIZE with distinct random integers each in range [0,2*SIZE], how can i ensure all ...
[7 replies] Last: good point. I wonder if the optimized built in shuffle is 'more actua... (by jonnin)
How do I set up function for input .
 
Hi guys , so here I am stucked with my coding , the assessment is to convert from normal program to function program. I almost done but there's one problem. How...
[3 replies] Last: #include <iostream> using namespace std; //*Declaration*// float inpu... (by Manga)
I need to write an essay
 
The Guide to Booming Personal Evidence Essay Holding a college application in your hands you might entertain what the requirements are going to be. Unremarkab...
[5 replies] Last: ...what, you mean no person will look for such information or look at ... (by closed account z05DSL3A)
How to make it continue looping
 
Code is completely finished, but I forgot one part. The program will read in a year, the number of times it needs to run (runs), and then several sets of inches...
[5 replies] Last: Hello ZestyCthulhu, I am a bit unclear on the instructions. Are you o... (by Handy Andy)
The function does not change the value of the global variable
 
Dear people, please answer me this question: My program is as follows: #include <iostream> int c=0; int fun() { for(int i=1;i<=100;i++) c++; ...
[4 replies] Last: Oh, so this is the reason. Thank you very much, my friends: jonnin, Pe... (by cegodica)
Arrays
 
Write your question here. I don't understand this code string *const p = new string ; string s; string *q = p; while (...
[4 replies] Last: The original code is meaningless. Look at the OPs next post. Obviously... (by dutch)
While won't begin, Outfile always wrong
 
This program is a headache, and every time I reread the directions I realize I'm doing something wrong. Since I doubt I could summarize it here are the directio...
[2 replies] Last: I fixed nearly everything and cleaned it up immensely. The infile was ... (by ZestyCthulhu)
Deleting beginning of a linked list
 
I go a txt file: 1 2 3 4 5 6 0 My assignment is to create a linked list containing those numbers, delete the first number and then output the rest into anot...
[5 replies] Last: Thanks a lot keskiverto! Good days! (by thinhphucvang)
Top-down Merge Sort implementation in C++
 
Hey all, I am trying to implement top-down Merge Sort in C++ as explained on this page - https://www.interviewbit.com/tutorial/merge-sort-algorithm/ P...
[2 replies] Last: Thanks, it worked! (by bunny99)
help me with formatting please! been trying to do it for hours and I can't get it. lol SoS
 
please help me with my homework, I am having trouble executing my code correctly . I managed to do everything properly except I'm not sure how to alternate betw...
[3 replies] Last: #include <iostream> #include <iomanip> #include <climits> // require... (by JLBorges)
2 by 2 matrix using for loops
 
Any advice?? Remember I'm a beginner and don't know all the lingo just yet. #include<iostream> #include<string> // Allows the comiler to receive strings. ...
[5 replies] Last: to avoid magic numbers I was swiftly mashing code together, as quick... (by George P)
for loops
 
Using 2 for loops, one inside the other, and a cout that only prints 1 asterisk, print a hill shaped triangle like this: Input a Number: 5 * ** *** **** *...
[5 replies] Last: Your original problem requires the two variables, one for each for loo... (by Ganado)
by Volkov
Calling functions from a map
 
So I am trying to write a menu driven program. I have the menu down and displays just how I want it. But I was wondering if there is a way to call functions fro...
[4 replies] Last: What you have there is std::function objects: http://www.cplusplus.c... (by keskiverto)
by Alb13G
Need to work correctly for negative numbers
 
Id like to be able to have the for loop in the function to work correctly for negative numbers in either input position. Write a function that accepts two input...
[12 replies] Last: Using recursion to handle negative numbers and adding appropriate valu... (by dhayden)
Linked list, implementation of insert function
 
Posted a similar question regarding Linked Lists, but as this is regarding the implementation of another member function I thought I'd make a new thread. #pr...
[4 replies] Last: Does head point to a dummy node or the first node? isEmpty() thinks it... (by dhayden)
construction order of object's members
 
In which order will the elements of an object get constructed? E.g., if we have a class with some members and a user-defined constructor like this: class Fr...
[5 replies] Last: Why can at line 22 objAA get constructed although it depends on objA ... (by Peter87)
[Problem] Binary Search
 
Dear C++ Community I kindly do not understand ,why the code does not output the number searched for? (it was suppose to be right) this was posted by my lectu...
[2 replies] Last: Thank you very much. I really appreciate all your help. (by NovaPrimeveera)
Linked list with unique_ptr and "old" pointer
 
Hello, I have recently started working on linked lists, and had a question regarding deleting nodes from the linked list. I have the following code: #p...
[13 replies] Last: Yes, that should do it. (by Peter87)
Connect Four - Drop Counter Logic
 
Any help is much appreciated - I am a total noob to C++ and require some help regarding a connect 4 style game. I have seen other topics to try and help but I a...
[4 replies] Last: Hi Andy, Thank you for taking the time to help me out. I really do ap... (by ClarkeyBoy99)
March 2019 Pages: 12345... 25
  Archived months: [feb2019] [apr2019]

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