Beginners - April 2019 (Page 20)

2D Bool Array
 
I have a two dimensional bool array that I have initialized to false through a constructor, and a print function that displays the results as follows. ...
[7 replies] Last: Do you want your true/false distribution to be even, or do you want a ... (by George P)
by srk100
Traversals
 
The program I have to create is described below. I have done the coding however the output is not doing the traversals. Is there a reason why? #pragma ...
[2 replies] Last: Some thoughts from looking at your code: Line 54: _root and _size ... (by dhayden)
by Bopaki
I am not sure why I am getting these error messages
 
-------------- Build file: "no target" in "no project" (compiler: unknown)--------------- mingw32-g++.exe -c C:\Martin\MalikChapter7\programmingExerci...
[2 replies] Last: Sorry not everything went through. Here it is: #include<iostream> #i... (by Bopaki)
Trouble with input
 
so I've been trying to enter in hours and minutes in a HH:MM format, but crashes and I've been trying to find out why this is the case. Here's my code for refer...
[5 replies] Last: Calc isn't quite right. When total_min > 60 you subtract 60 from total... (by dhayden)
While loop to allow the User to run the program more than once.
 
I've written a program for my c++ class that is attached. Everything works fine except the fact that I have to use a While loop to allow the User to run the pr...
[7 replies] Last: If you must have using namespace std; then you need to change your var... (by dhayden)
initialization of a vector
 
Hello, I have an error I think with the initialization of a vector error: no matching function for call to ‘City::City()’ { ::new(static_cast<void*>(...
[6 replies] Last: Note that reserve doesn't actually change the size of the vector so yo... (by Peter87)
Write access violation
 
I got a code like this #include <iostream> #include <string> #include <fstream> #define MAX_SUBJECTS 10 using namespace std; struct Subjects {...
[1 reply] : When I compiled it... That seems unlikely. This error happens when y... (by Repeater)
2d vectoe
 
How do I create a 2d vector of size 10^9x10^9 and iterate through them without TLE or runtime?
[1 reply] : An std::vector<int> (_int32) with that dimensions would take up 50... (by Grime)
RE(OTHER)
 
I'm getting RE(OTHER) on this code on codehchef #include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t--){...
[1 reply] : You're going to have to do better than just dumping your code. Like f... (by salem c)
by Bopaki
Why is my program not printing the elements of the stack
 
It prints addresses instead. #include<iostream> using namespace std; class Stack{ private: struct node { ...
[8 replies] Last: Thank you all !!!! Using the arrow operator yielded the desired output... (by Bopaki)
by yat89
random number and swap
 
Hi all. I'm c++ beginner. I had write codes to generate two random numbers then swap those, but I can't get the correct solution. I don't know where I had done ...
[17 replies] Last: Thanks JLBorges for your advice. I had add some error checking. Erro... (by yat89)
by Vetzo
avoid #define
 
Hello Forum, I have class with the function "GetMessage()". MyClass* objMyClass; objMyClass = new MyClass; objMyClass->GetMessage(); But when I call ...
[3 replies] Last: Yes, I need the windows.h stuff. undefining their stuff doesn't sound ... (by Vetzo)
by libi
C++ connect to website database
 
So I am playing around and seeing if I can code something to connect to a web host database so I can essentially use it as a storage container. I know you can c...
[5 replies] Last: Thinking about your question, and trying to understand what you're doi... (by Cheddar99)
do not respond (1,2)
 
I was never trying to argue. let me clarify some things. I do write my own code. I never said watching people did not work. I never said all I could do was copy...
[33 replies] Last: what? I wasn't hoping for any answer. it was a simple yes or no questi... (by closed account N8MNAqkS)
cin
 
std::cin >> allows me to get user input for numbers, and then you press enter. is there an equivalent to this for text
[1 reply] : If you want to include spaces in your block of text, you can use std::... (by George P)
Posting a question? (pointless test)
 
I've tried twice to post a question and get a server error page both times. I clicked the "notify us" link. This is a test to see if I can do it with a short...
[no replies]
What's wrong with?
 
Write your question here. #include <iostream> int main() { char v { "Hello ", "little ", "friend." }; char ** p = v; std::cout << *p+...
[5 replies] Last: Also, please do not write "p++" more than once per line (or reference ... (by Ganado)
by nj1234
can't find why this bug occur
 
in my function i like to take a char from the user but that char must be small letter and same letter cannot be used twice #include <iostream> #include ...
[1 reply] : Line 21: The first char of alo is a space, so a!=alo is always going... (by AbstractionAnon)
Is this the most efficient code?
 
Hi, I'm doing some study, and one topic is making a recursive function to print this: **** *** ** * Is my code the best way to do this? #include <i...
[14 replies] Last: Will every stackoverflow check be an if statement? I've never seen an... (by keskiverto)
Calculate weighted average in Array
 
Im trying to find the weighted average of the five test grades for each course and store it in the same array. Currently I have the averages without any weight ...
[5 replies] Last: Your code is very difficult to read. Have you learned about structures... (by dhayden)
April 2019 Pages: 1... 1819202122... 24
  Archived months: [mar2019] [may2019]

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