Beginners - May 2015 (Page 19)

C++ warning: control reaches end of nonvoid funtion
 
I keep getting a C++ warning: control reaches end of nonvoid function on the last two }. Someone please help me. #include <iostream> #include <iomanip> ...
[1 reply] : No need to create multiple threads, keep it at http://www.cplusplus.c... (by Hippogriff)
by dfg221
Find a string within a string
 
The Instructions are: Your program receives from user two strings of symbols: first long one and then short one. Then your program returns all positions in long...
[1 reply] : http://en.cppreference.com/w/cpp/string/basic_string/substr (by kbw)
Game of Life
 
So I am having trouble generating the second grid for this game. I was wondering if you can help? I am stumped as where to go from here. I need to run this 5 ti...
[no replies]
by Atton
Reading a file in blocks
 
I've been working on a system to read data in blocks. It works well with text but when I try reading something like exe's it produces bad or not data. Is it pos...
[4 replies] Last: Ok (by Atton)
Operator returnig values
 
Hi all. I am studying c++. I wrote this simple code trying to define an operator in my class. But I expected to see the output "I am 22 years old" and I am r...
[1 reply] : Use your operator member as follows: person& operator=(person& N){... (by CLman94)
Need Help
 
Write a program to help a clinic calculate the Body Mass Index (BMI) of 50 patients. The program asks a person for his height in meters and his weight in kilogr...
[2 replies] Last: Thank you my friend (by hemameh)
by savanh
question
 
i dont know why it is not run , it is show me red line under fun and fun7 in the main part ,can any one help please? #include<iostream> #include<string> ...
[3 replies] Last: It works if you remove the templates. Also this line: for(int i=siz... (by Arslan7041)
Substring Printing using a For loop
 
I am trying to read in the message I Love C++ & Loops!!! from a file in to a string variable and than print each letter of the message starting from the first l...
[no replies]
Reading in the name "De Blasio" from text file?
 
I have to fill up an object array by reading from a file (called "customers"). Its working fine, except that one of the words I have to read if "De Blasio". It ...
[17 replies] Last: Can anyone help me with this? How do I align the tables? (by Arslan7041)
by Winsu
C++2011
 
Hi everyone, I have a doubt, I have got a code which I have to compile it with C++2011 standard. I dont know how to set that on my IDE, I'm using Codelite 5...
[5 replies] Last: GCC 4.7.1 understands -std=c++11 You enter the setting in the edit bo... (by andywestken)
Basic Help with Copy Constructor
 
Edit: Sorry I'm a total idiot...just figured it out after posting this thread. I was apparently totally blind...if you're bored, I'll leave the post as is and y...
[1 reply] : As you see on line 28, it is changing a.sz to sz What's "it"? Copyi... (by andywestken)
GetLine help
 
I have a problem figuring out how I would be able to do this. The problem is that I need to search for a word and store what lines that word appears in in a vec...
[no replies]
Search sub function for a linked list
 
Good day. :) I need help with the snippet of my code. My search sub function is not working and I haven't got the slightest to fix it. The problem is. When...
[3 replies] Last: loop (by ne555)
by avade
String reading
 
Hi, I have a question about reading segments of a string and extracting information. For example, how would I differentiate the difference between a number...
[2 replies] Last: Would using stacks help? To pop and push certain the segments help rea... (by avade)
Whats wrong with my classes
 
Can anybody tell me what is wrong with my classes. I get a error I don't know if you can't declare strings like that or not. Help Me #include <iostream> #inc...
[3 replies] Last: Void Dog::GetFurColor doesn't match any type in Dog(); (by Blackhart98)
by TRun
Reading text data into array of class objects
 
This program has many parts but before I can move onto the next step, I have to figure out how to read data from a text file into an array of class objects. An...
[2 replies] Last: I'm really new at this and don't have much to go by except the textboo... (by TRun)
Multiple Inheritance With Member Bad?
 
Hello! I am trying to find a good way of sharing data between different objects(or keeping different members of each object synchronised with each other). ...
[no replies]
how to round ?
 
the question is requiring me to write a program that produces a bar chart showing the yearly income of a small company starting 1990. The program reads the inco...
[2 replies] Last: thanks for your help, i really appreciate it :):) (by asdfgh4600)
mini calculator
 
#include <cstdlib> #include <iostream> using namespace std; int main() { int a,b; cout<<"enter the numbers.\n"; cin>>a>>b; char choi...
[1 reply] : Thanks. (by mutexe)
second degree aquation
 
#include <cstdlib> #include <iostream> #include <cmath> using namespace std; int main() { int a,b,c,delta,x1,x2; cout<<"enter a,b and c.\n"; ...
[no replies]
May 2015 Pages: 1... 1718192021... 40
  Archived months: [apr2015] [jun2015]

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