Beginners - December 2015 (Page 42)

How to count am,is,are (to be) from a text file?
 
Hey guys, I need a program which counting am,is,are from a text file. I find lots of program which is counting vowels from in a text file But when i use am to a...
[2 replies] Last: Something like this? #include <fstream> #include <iostream> #include... (by cire)
Finding a number in an array
 
Im trying to find the number 197 in the array but even when its there, it says that it is not. I can't find what is wrong with my code. What do you guys think? ...
[2 replies] Last: Thank you! I fixed it already. (by Beginner1551)
Throwing an exception that isn't caught.
 
I'm in Visual Studio playing around with the following code. When doStuff() throws 2, what is the vanilla way of handling the exception? I thought the way it...
[1 reply] : That break/continue popup means Visual Studio encountered an unhandled... (by AbstractionAnon)
Run this for me please
 
I dont have access to C++ right now. Can somebody run this program and tell what the results are please. void f1(int); int v1, v2=9; int main(void) {...
[2 replies] Last: Thanks (by xcleonardo)
Triangle Project (Using Functions and Arrays)
 
Hey everyone, for my final programming project, we must let the user enter 3 lengths in which we then must determine what kind of triangle it is. Functions and ...
[3 replies] Last: Those two functions are expecting a consts. So you can send them const... (by mpacker)
by dmc
"using", protected constructors and initializer_list
 
Hi, I'm working through Stroustrup's Programming book (2nd ed.), and in Chapter 13 he has a derived struct (Open_polyline) that makes direct use of its base ...
[2 replies] Last: Many thanks for the reply. dmc (by dmc)
insert a small matrix into a bigger matrix
 
Is it possible using 2d vector to insert one into another.. so let say we have 2d vectors A,b sized as. ------ | | ...
[2 replies] Last: so no way to do it using copy.. or insert? (by DrJones)
encode mess
 
I need to encode mess by flipping the bits in each byte. Woould you help me to solve it, please This is my code #include <iostream> #include <str...
[3 replies] Last: #include <iostream> #include <bitset> #include <limits> int main() {... (by JLBorges)
Array for loops
 
Solved thanks.
[16 replies] Last: Do you have to remove your initial post?, other people may find this u... (by TarikNeaj)
by soniya
Max and MIn values
 
How can find the max and min values from input that the user enters #include<iostream> main() { int limit,input; int sum=0; int i; st...
[2 replies] Last: The last line is wrong for several reasons. Since division has higher ... (by dhayden)
Linked List C++
 
Hi everyone, i have a general question. im creating a random class (person for example), and i want all persons to be stored in a linked list. now, how do i ...
[2 replies] Last: The easiest thing is to just use std::list<>. If you really want to c... (by dhayden)
by mhurt
Assign letter grades with array
 
Hello everyone. I've been assigned an array to generate letter grades from a points score. I believe I've laid out the array in the proper way but when it comes...
[3 replies] Last: Thank you whitenite and Thomas for all your help. Whitenite I was actu... (by mhurt)
Using another header for conio.h
 
Hello, I would like to write a C++ programme on Ubuntu, which reacts immediately to the input without pressing enter. (-> I cannot use the header #includ...
[3 replies] Last: I do not know what I should use instead of getch() and putch(). All m... (by jlb)
Input at most 4 words
 
I would like to cin at most 4 words but I couldn't figure out a suitable algorithm. I have tried the below one but obviously it doesn't work. And I don't kn...
[1 reply] : Use std::string instead of char You are making the code a bit too... (by kevinkjt2000)
Multidimensional array of pointers to a function
 
Hello. I want to use my multidimensional array of pointers on a function, but i don't know how to pass this array to the function. I want this code to work, bu...
[3 replies] Last: As I said above, [quote=chervil]When passing an array to a function, ... (by Chervil)
Overloading operators
 
I got an error of 27a1.cpp:30:21: error: no viable overloaded '=' return a.stateName = b.stateName; Below is my source code #include <iostream...
[15 replies] Last: #include <iostream> #include <string> #include <set> using namespace... (by closed account 48T7M4Gy)
Finding highest and lowest values in a string
 
I am supposed to write a program that lets the user enter random numbers from the keyboard into a string and then the program should total all the numbers and o...
[3 replies] Last: True, you need to count how many numbers the user enters. (by DDomjosa)
expression must have class type
 
On line 34-37, there is error of "expression must have class type" I have declare runway as member variables of airport, but I don't know why it can't recogn...
[3 replies] Last: Hi, Are you going to consider having the separate header and cpp file... (by TheIdeasMan)
3 equations but C++ code is not executing
 
Hi there I've had some great responses on this website for other queries. I've written the code below but I can't understand why it is not executing. The o...
[5 replies] Last: Wow 4 replies. Thanks for all the thorough responses. Mr Impact, I w... (by jamzcox)
by ebucna
overloading operator
 
I need to find journey time (arrivalTime - departureTime). I have Time class with minutes and hours. and Flights class that arrivalTime and departureTime declar...
[2 replies] Last: so obvious thanks (by ebucna)
December 2015 Pages: 1... 40414243
  Archived months: [nov2015] [jan2016]

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