Beginners - March 2021 (Page 2)

How to calculate time complexity of this code?
 
What is the time complexity for my code with showing your steps? I tried to figure it out by doing O(T*(n+n+n)) = O(T*n). Am I correct? And any suggestions to m...
[1 reply] : Don't double-post. http://www.cplusplus.com/forum/general/277131/#msg1... (by lastchance)
by NiceS
Trouble editing text file
 
Im trying to delete a row of data from a text file with the input prompt from the user. Firstly user will enter the id of the staff and there would be compariso...
[3 replies] Last: Thanks salem c i think i misunderstood your sentence as i have just fo... (by NiceS)
Python and C++
 
Hi guys, I feel somewhat tentative asking this question but I'll bury my pride and just ask it anyway. So I should know this by now and I think I may but I ju...
[5 replies] Last: Yes, back when it was C with classes. (by helios)
Confused about incrementing
 
If have two values, a female value and a male value that both equals 10, so 10 females and males, and two of them mate and create a kid, and I put something lik...
[2 replies] Last: Thank you, with my program I was taking a more of a procedural approac... (by possum swallower)
How to recursively call a recursive function? (AVL/BST tree)
 
For this project, search all the nodes to see if the username key is the same as the node's username, then insert the object into the node. If no node is found,...
[2 replies] Last: In the original post, you're passing node by reference. At lines 4 and... (by dhayden)
by NiceS
Trouble reading and displaying text file
 
Sorry for the long code but im trying to develop a function that is call by the main function to read multiple data from different text file and store it in the...
[6 replies] Last: @Andy - as I said, what I posted above was for just reading one file ... (by seeplus)
by JRManx
Calling class member function on initilization
 
I have a very short question, all it needs is a yes or no answer. Although an explanation would be perfectly welcome! If I have a class, for example, Bank, whe...
[10 replies] Last: The number of errors in a code base is roughly proportional to its si... (by thmm)
Kindly Help me understand arrays
 
I don't know what to do. I wanted to make an array that contains numbers that are in order from 1 to 100 but one number is missing and this missing number is t...
[9 replies] Last: @op, to make things a bit simpler let's do it with 10 numbers. int ... (by thmm)
forward list question, tail node?
 
I am reading an stl book about forward lists. I understand that they are implemented using a singly linked list. the book says " The anchor of a forward list ha...
[4 replies] Last: So the potential is an impossibility. Got it. (by George P)
by bstroe
Move the area
 
I want to move the areas : N -> E, E -> S, S -> V, V -> N The problem is that my code moves only one element in the matrix and not all the elements in the area...
[1 reply] : #include <iostream> #include <iomanip> #include <sstream> #include <f... (by lastchance)
Updating the Menu
 
Hello guys. I am doing program for a movie ticket reservation system. For that coding I'm doing a menu that will display the movies in the text file. It should ...
[11 replies] Last: Hello Mathavan, My bad I thought I had put a comment on line 40. In ... (by Handy Andy)
by kg88
Expression must have class type
 
Hi I've had this issue before with another program, but I'm not sure why this is occurring again. I've changed some code around and the error is the same regard...
[6 replies] Last: Hopefully this makes more sense. At least there are no longer issues ... (by kg88)
CMake Error Help
 
I can not run any program in CLion and this is what it says. /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlock...
[3 replies] Last: Grey Wolf, He might not need to download it. I already have Comand Li... (by JRManx)
by siid14
Undefined symbols for architecture x86_64
 
I'm making a rectangle program, split in 3 files : rectangle.cpp Rectangle.h rectangleProgram.cpp First I did the program in one piece without any err...
[7 replies] Last: @siid14, Ganado is correct. Copy and paste this command into your com... (by JRManx)
Can't print user input for 2D Array
 
Hello, I'm having trouble with my assignment. We're supposed to create a string type 2D Array of 4 columns and 3 rows. The user has to enter 12 names or words t...
[5 replies] Last: Agree, but it does matter for performance for some classes etc - so IM... (by seeplus)
How to change the size of array
 
Hello. I am trying to change the size of an string array but Im getting an errorI have declared string movie_name as golabal variable and I am using movie_name...
[4 replies] Last: Plain array is not an object. It has no member functions. string mov... (by keskiverto)
Need Help With Programming Assignment
 
#include <iostream> #include <cmath> using namespace std; float CalstdDeviation(float StoreArr ); int main() { int i; float StoreArr ; c...
[11 replies] Last: #include <iostream> #include <cmath> #include <valarray> using namesp... (by lastchance)
PLS HELP!
 
I need help! I need to make the following program: First when I print the numbers (example 5280474088) the program should extract all the numbers from the s...
[12 replies] Last: seeplus thank you!! lastchacne it does not matter (by HanibalBarka)
by NiceS
Trouble writing to text file
 
Im trying to write to edit a text file by rewriting the entire file, initially the file is as below, but if i were to change the quantity to eg 19 for one of t...
[2 replies] Last: See my code from your previous post http://www.cplusplus.com/forum/beg... (by seeplus)
by hbcpp
Calling C# Methods
 
I recently came across this C# library https://github.com/Tyrrrz/YoutubeExplode It seems to be a very useful tool so I would like to use it, as I don't speak C...
[10 replies] Last: Thanks for all the info. learned a lot. (by hbcpp)
March 2021 Pages: 1234... 13
  Archived months: [feb2021] [apr2021]

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