Beginners - February 2020 (Page 6)

dirent
 
Hi, I am using <dirent.h> to get access to pictures in a folder and get their size. This code runs, but the outcome states that all the pictures contained a...
[16 replies] Last: please refer to my newer thread (by denbja9)
by mpg
Asymptotic complexity: Dichotomous research
 
Sorry in class (I'm in high school) the professor explained this about the asymptotic complexity: Linear search: "classic" search of an element in a vector...
[5 replies] Last: are you asking about the notation and how to read/write it, or how to ... (by jonnin)
by brim4
How to print words that don't exist in both of my arrays
 
I have two arrays one is called word which contains 3 words lab, mat and can. The second is an array called line which contains the characters labfromcabcan I...
[7 replies] Last: Thanks Wail that seems to have worked. I do wonder if there's a way to... (by brim4)
issue with using aliases: syntax error: missing ';' before '*'
 
I have two classes unsorted.h and a child class Appointment.h. They Should take input in the form: 1/23/1999 Coffee I want to use Appointment as ItemType bu...
[2 replies] Last: The assignment description wants the appointment class to be aliased a... (by Volapiik)
type
 
in python, if let' say I want to obtain the type of a variable, I simply write as an example: a=10 print(type(a)) output= int Is there a way to do this for ...
[6 replies] Last: In your code block, which would be the name of the file? If you are u... (by Ganado)
Time Complexity of O(n/e^n) - Where does it lie?
 
Following is the order of few complexities.. 1/n < 1 < logn < √n, n < nlogn < n^2 < n^3 < ..... < 2^n < 3^n < n^n My question is, where do the f...
[2 replies] Last: what kind of problem has e based complexity? I don't recall seeing an... (by jonnin)
Blackjack 40
 
I'm creating a blackjack 40 game for my class. The code should output "BLACKJACK!" only once at the start if the player hits 40. The player will win 20$ once th...
[4 replies] Last: http://www.cplusplus.com/forum/beginner/268170/ (by againtry)
Need a little help or explaining
 
Here's the part of the condition: To create an abstract class C Digit: Not public member variable "digit" Features: -for reading -to record Output Functio...
[1 reply] : There are a lot of problems. Too many to mention them all. Here is the... (by coder777)
Forward Declaration is !(a lie)
 
I'm playing around with building my own compiler, obviously just a learning exercise. This means I am viewing the assembly output of gcc -S Now read the tit...
[11 replies] Last: OMG Ganado, That is quite the list! YES!!! Thank you, these are perfec... (by newbieg)
Circular reference
 
Hi, I don't know how to avoid circular reference. Classe B need a object of class C and C one of B? #include B.h Class A { } #include C.h Clas...
[5 replies] Last: You want to create object of type C. It has one B object inside. That ... (by keskiverto)
Use variable form chils class
 
Hi, I'm new in c++. I want to use a public variable form the parent class but I'v got always the error Expression must be a modifiable value class Shape...
[2 replies] Last: thank you (by vbourbeau)
Computing pi in a function and returning it to main function
 
I am constantly getting an error message that says -> (error: implicit conversion from '_Complex int' to 'int' is not permitted in C++) i don't know how to fix ...
[5 replies] Last: I'm afraid this is one reason why I dislike these online systems for h... (by lastchance)
isDigit error
 
My isDigit automatically detects that an integer is a letter. I want to make it where it works perfectly and prompts an error message when a letter is inputted...
[7 replies] Last: Out of the 3 the Flying Nun wins - who says there was any competition ... (by againtry)
Generate a list of characters based on pre-defined values
 
Hi, Hoping someone can help me out. I am trying to create a basic little program that will generate a list of values from a pre-defined list of acceptable c...
[4 replies] Last: wirelesskill, did you mean for your second if to not be an else-if? (by Ganado)
by bsmith
Classes
 
I am new to classes and I'm having trouble figuring out to to create the constructors for them. Below is my class, and after that is my copy constructor (I ...
[5 replies] Last: Is there something in this code that may cause that? xstring & xstri... (by keskiverto)
Debug Error! abort() has been called
 
Hi everyone, I was making a kind of bank application just to get some practice in, and I've come upon an error i haven't been able to solve by googling or exper...
[8 replies] Last: I added an if statement to catch if n is out of bounds and it works as... (by elgato69)
Creating a graph
 
Hello, I must create one graph. I have not used graph before so I am unsure how to do this. I have all the data stored, first the vertex names in a vector, and ...
[3 replies] Last: https://www.geeksforgeeks.org/graph-data-structure-and-algorithms/ (by lastchance)
Output file has no information
 
"Write a program that will create userids for email addresses of a company. Names of employees will be contained in a file. Your task is to read the file charac...
[4 replies] Last: @jlb, Point taken thank you, Andy (by Handy Andy)
I wanted to start programming
 
https://www.learncpp.com/
[6 replies] Last: The OP was unpersoned rather abruptly, apparently. So us lunatics dec... (by George P)
Sort vs stable_sort and comparators.
 
I have an input vector of vectors as I use sort with a comparator function as: vector<vector<int> > numbers = {{3,3,4},{2,1,2},{2,2,8},{2,3,4},{5,5,6},{1,2,1}...
[8 replies] Last: Correct. Since the comparison function doesn't meet the requirements f... (by helios)
February 2020 Pages: 1... 45678... 13
  Archived months: [jan2020] [mar2020]

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