Beginners - March 2017 (Page 21)

Loop Menu
 
Hello, newbie here and had a few questions if anyone could help. Currently not finished, case3 can be ignored. So right now everything is working fine sort of e...
[2 replies] Last: Hello Bettarun3, Welcome to the forum. I see the end of your program... (by Handy Andy)
Find and print the occurrence of a specific value
 
Creating program for school assignment that prints random values. I have to create an if statement to find and print how many a value occurs, specially the valu...
[8 replies] Last: keskiverto: OP is a bit ambiguous. title mentions specific value but... (by gunnerfunner)
by Angel1
Triangles
 
hi guys , just wondering if you can help in printing out a right triangle , but with words. Also using the .length in the equation . Please show me using c++
[6 replies] Last: #include <iostream> #include <string> int main() { std::string ... (by gunnerfunner)
Calculations Not Coming Out Correct
 
I'm not asking for anyone to do my home work, I just cant figure out why this isn't working. Once you enter more than one value for beginningReading, endingRead...
[13 replies] Last: No problem, glad I was able to help. (by llxx)
Getting Substring from class string object
 
Is there a problem in my class getSubString Fuction. there are two arguments taken (starting-index and length(that how big you want your substring to be)) ...
[4 replies] Last: Hello NabeelUsmani, Got it to work, but not sure if its right or what... (by Handy Andy)
by arbwok
pop_front a pointer
 
I'm getting malloc: pointer being freed was not allocated error. I suspect that it's one of my function that uses pop_front(). This is the basic run down ...
[5 replies] Last: As in the original code when you call insertIntoCPU the waitingQueu... (by cire)
base class and subclass - vectors - Bugs
 
Hello guys, I wrote this code just for fun, but I get some bugs that I don't know how to fix. Any idea how to fix them ? Please run the code in an IDE like c+...
[5 replies] Last: @cire, I already have a default constructor in my class 'small'. The ... (by cire)
why this code give error
 
Error: Segmentation fautlt #include <stdio.h> void main() { int arr = {1,2,3,4,5}; int *ptr ; *ptr = *(arr + 2); //ptr ++ ; printf("VAlue = %...
[5 replies] Last: If you want to store a copy of the array element, why not simply store... (by Peter87)
Profram keeps saying "Can't open the file"
 
I wrote number analysis program. There is no error. But when I run it, it keep saying "Can't open the file." and I have the file. I put correct name, but it doe...
[1 reply] : I put correct name, but it doesn't work. No matter what name you "pu... (by cire)
Greatest common divisor
 
From the keyboard are introduced the natural number n and k(2<=k<=n).I have to display all of the pairs of natural numbers < than n,of which greatest common div...
[3 replies] Last: Hello AndreasTm13, I agree with jonnin the use of the "%" (modulo) op... (by Handy Andy)
Help with Program using C++
 
Hi - I am new to all of this computer science and programming. I need to: Write the “Will I eat lunch” program (Use Nested If statements). Declare va...
[5 replies] Last: Ill give you a little hint. Create bools for each criteria (am hungry,... (by kingkush)
What is wrong with my function?
 
3 integers named score1,score2 and score3. and I assign their numbers ( has to be between 0 and 300) has to keep printing scores until sentinel is reached ( -99...
[3 replies] Last: #include <iostream> #include <fstream> using namespace std; int val... (by kingkush)
Bad programming practices
 
Hello! I'm taking an optional C++ course at my local uni, and the professor insists my code is full of so called "bad programming practices". I have some self-t...
[6 replies] Last: If you are writing a code book in print, then save space is good. but... (by jonnin)
Reading a string and outputting the amount of times each letter occurs
 
I can't figure out how to efficiently store and print out every case of a certain letter in this program. I could just make a variable for every letter but I re...
[3 replies] Last: Too much work :) for ascii: unsigned int tbl = {0}; for(... j = e... (by jonnin)
by IaxJa
Need information on variable TYPES
 
Greetings, first post. I am teaching myself C++ and learning from the tutorial on this site primarily. When I look at code examples from other sources, the on...
[4 replies] Last: Why did you delete my last post? Was it because I bashed the education... (by IaxJa)
Problem with function return
 
I can't figure out why the findsum() is not returning the correct value. This is the assignment question if it helps: The main program will call a function...
[2 replies] Last: Thank you Goldenlizard! (by esokoletsky)
No matching function for call error
 
I keep getting this error from my program. 22 26 C:\Users\Earl i&\Desktop\C++ Finals\C++ FINALS.cpp no matching function for call to 'std::basic_istream<char...
[1 reply] : http://www.cplusplus.com/reference/string/string/getline/ getline() re... (by gunnerfunner)
by SoLix
My class doesn't get the correct information from the other class
 
Write your question here. #ifndef DATA_H #define DATA_H class Data { public: Data(); void newData(); void sav...
[13 replies] Last: Best wishes and good luck with your program. Cheers :) (by closed account 48T7M4Gy)
Kindly solve this program.
 
Write your question here. Question a. Name the data members that can be accessed by an object of bus class b. Is the member function output data accessible to ...
[4 replies] Last: Dear Keskiverto Which data members that can be accessed by an object... (by r 4 raja)
vectors sent from .cpp to .h file using classes and objects - Bug!
 
I get few bugs regarding my code. Any ideas what approach can fix this problem ? Background code info: The purpose of this code is to use the ideas of inheri...
[2 replies] Last: OP: error messages suggest the problem lies in trying to initialize a ... (by gunnerfunner)
March 2017 Pages: 1... 1920212223... 36
  Archived months: [feb2017] [apr2017]

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