Beginners - November 2018 (Page 19)

Count how many votes a number has
 
Hi, I am wondering how would I go about counting the amount of votes a certain number has in an a...
[4 replies] Last: SamuelAdams: I don't think sorting is appropriate here. It would almos... (by mzimmers)
optimized this code (1,2)
 
#include <iostream> using namespace std; int main() { int t; cin>>t; while(t--){ ...
[24 replies] Last: tpb , I'm not solving the problem, that post was off the top of my he... (by dhayden)
A number of errors, all on one line
 
Hello! I've recently borrowed a textbook from a friend so I may practice coding using the examples l...
[3 replies] Last: Oh, bless you. I thought I put commas there before and it came up nil,... (by Mobliterated)
format ‘%s’ expects argument of type ‘char*’
 
I am running a program that initializes a vector full of integers, assigns randomly generated intege...
[3 replies] Last: Peter87, that did the trick! Thank you! (by vaderboi)
Can not erase other non alphabet characters without going out of range
 
I'm supposed to get a string with spaces, numbers, or punctuations to become alphabet characters onl...
[5 replies] Last: http://www.cplusplus.com/reference/cctype/isalpha/ If done from scrat... (by lastchance)
by kmce
Advice on learning programming
 
Hi, so I am in my second year of uni, learning programming, and i feel like I am not getting anywher...
[11 replies] Last: ..I wasn't sure how I would keep track of the amount of days of not c... (by Thomas1965)
by AL88
undefined reference to Array::operator[](int)
 
Can someone help me fix the error on line 61 thanks. #include <iostream> const int defaults...
[1 reply] : You nee to implement these member functions that you declared. in... (by Ganado)
arguments to main( )
 
Hello there, can someone tell me why I need the '*' operator in the argument list of main ()? Do...
[10 replies] Last: I agree with jonnin. Being familiar with both Windows and Unix/Linux i... (by Ganado)
Increase vector with while loop
 
I want to be able to have the numberSorting.at increase with each loop, but I can't figure out how t...
[2 replies] Last: Thank you! (by amanseau)
by ashwyn
Help with Decimal - Binary conversion ?
 
Hello. This is code for testing a function that will be included in a larger program. I'm tryi...
[4 replies] Last: I prefer the recursive version, but this alternative fixes the string ... (by lastchance)
by AL88
why is my template specialization not working?
 
I'm trying to fix the error on the line "Felix.append( Felix );" by ajusting the function and peovid...
[5 replies] Last: Line 29 to 34 doesn't make sense. Remove it. Instead put appen(...) in... (by coder777)
Using Pointers with a Class
 
Hello, so this code was working in my compiler, but sometimes I would get an error message. It's wei...
[2 replies] Last: It's not likely to be “11 db”. Arguably, it's “lldb”: https://... (by Enoizat)
one Question
 
...
[1 reply] : That is inheritance, but ... Public inheritance means IS-A relationsh... (by keskiverto)
Tired of trying
 
Hello. I need help with a problem. The task is : The user inputs a number n, and the program must...
[11 replies] Last: Thank you, when I go home I will fix it and let you know if I have mor... (by gabrinka)
Program to display shapes?
 
So, I'm trying to write code for a program that outputs stars (*) and spaces to create shapes based ...
[1 reply] : You have given the sizes (int n) for each shape, so you need to code i... (by nuderobmonkey)
determining if 2 values are positive prime values
 
this is my first c++ class. both values must be positive, if its negative it will output an error a...
[4 replies] Last: so you are saying to delete this line if ((p > 0) && (q > 0)) and... (by senkovlad16)
by fedegp
Lambda Function returning double
 
Hello to everybody, I'm trying to create a class which contains a lambda function which is defined ...
[2 replies] Last: Thank you very much. Now it wors. So in this case, putting "return 2" ... (by fedegp)
[1st year University Comp Sci] Using a ManagedArray and a GuardedArray to create a Polynomial class
 
I've been tasked with creating a C++ class called Polynomial that applies different mathematical for...
[1 reply] : Example polynomial: a*x^4 + b*x^3 + c*x^2 + d*x + e ItemType foo {... (by keskiverto)
Directed Acyclic Graph
 
So I am studying graph data structures and I want to implement DAG but I am facing one problem, I wa...
[2 replies] Last: To create a random DAG you create a random proposed edge. Let's say it... (by dhayden)
Please help me out of the problem.
 
Hi, I practiced programming c++ with visual studio code on Mac. But when I tried to debug the code a...
[2 replies] Last: fopen() will set errno to tell you exactly what went wrong. #include ... (by dhayden)
November 2018 Pages: 1... 1718192021... 24
  Archived months: [oct2018] [dec2018]

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