Beginners - September 2015 (Page 3)

by aloud9
cin problem
 
in the "Cin >> Package" I want to type Letter A that is equal to 400 and Letter B=500 Letter C=1000. My program wont accept Letters. #include <iostream>...
[1 reply] : You just need to declare Package as a char rather than a double ... (by Norm Gunderson)
by ywyak
Km to miles conversion
 
I have a task of making conversion of Kilometer into miles, which I did successfully in below here. now I must include to display the amount of fuel consumed. a...
[2 replies] Last: The name "km_per_mile" is incorrect, since the variable actually conta... (by helios)
baseball stats program help plz
 
Hi cplusplus members I need help with my assignment I'm not understanding what I'm doing wrong my program wont run because of a error on line 52 column 1 expe...
[3 replies] Last: Here is a simpler, indented code that has the same error before line 1... (by keskiverto)
map<string>, vector<string>> myMap (1,2)
 
Hello, trying to figure out if could be possible to have a map in that way: myMap ["PLUTO"] = {"DOG", "10", "Male"}; myMap ["PLUTO"] = {"PLANET" , "2,"...
[24 replies] Last: Sorry for the late replay. Seems that the mentioned routine was not i... (by Amiplus)
rainfall program using functions
 
Hi, I am a beginner to programming and i am taking a programming class. The assignment i am having issues with is the creation of a rainfall program. The progra...
[4 replies] Last: Thanks very much, It worked. (by chrismc1976)
by Giftfg
question
 
A C++ built in random function generates random numbers in a given range. write a game program that asks a user to enter any value between 1 and 10 and the prog...
[5 replies] Last: okie I tryd to study that one posted by ericool but when compiring it ... (by Giftfg)
by rogerx
usb driver?
 
Hi, im an electronics engineering student and i took a project for my third year class. Me and my friend are trying to do a hybrid (analog + digital) synthesize...
[1 reply] : Depends on your OS. If your in Windows check out MSDN : https://msdn.m... (by wizebin)
by saruff
HELP PLZguess the number (random+functions)
 
write a program that picks a number between 1 and 100, and then lets the user guess what the number is.the program should tell the user if their guess is too hi...
[11 replies] Last: sure, thanks (by saruff)
Need help graphing a sine wave.
 
I have an assignment to graph a sine wave using modular programming, but i have no idea where to even start. it doesn't have to be like an exact thing, i beleiv...
[8 replies] Last: oh, that is so cool(it's working now), thank you a million times! (by foamrule)
Help! Output is not printed.
 
So these are the three files. I executed C.cc, no error is there but nothing gets printed either... It's suppose to print the value of x. What's wrong in this...
[2 replies] Last: The reason is on line 10 in C.cc: The compiler misinterprets the expr... (by coder777)
by A1693
Dynamic array issues
 
So I thought I had this down but I guess not. In order to create a dynamic integer array with a given size SIZE, you do the following: #define SIZE 1...
[2 replies] Last: remove () . Note also that define is lil evil here , if I was a compi... (by Ericool)
ASCII
 
This is perhaps really stupid, but I just don't get it. Why would I write these codes char letter; letter = 65; cout << letter << endl; char...
[4 replies] Last: note that a char can also store value between -127 and 127 Or 0 and ... (by MiiNiPaa)
Almost done with program need a little bit of help finding max! (Functions/Arrays)
 
Hi everyone, was just hoping I could get a little bit of help on this problem! The goal of the program is to take a user-generated array and find different stat...
[5 replies] Last: I thought the point of mentioning a binary tree is a worthwhile additi... (by closed account 48T7M4Gy)
by Winsu
confusion with strcpy
 
I have been playing with strcpy http://www.cplusplus.com/reference/cstring/strcpy/ and well, when I do an operation with a source and a destination if that des...
[2 replies] Last: I recommand that you use string class methods(c++) define in <string> ... (by Ericool)
returning char array in classes
 
i have created a class, and i want to create a getter function that returns char array. i made it const function because the func doesnt change any values, howe...
[5 replies] Last: generally speaking try to avoid returning non-const pointer for getter... (by Ericool)
error: format specifies type 'long long' but the argument has type 'long long (*)(long long)
 
Hi, new to C++ but thought i had a good understanding of the basics, however, im having trouble compiling my program. PLEASE NOTE THAT I ONLY WANT HELP WITH TH...
[4 replies] Last: Thanks loads, I have changed it to long long firstDigit(long long x){... (by solidstan)
Plz help!!
 
Why is this simple code not working ? String itemname; getline(cin,itemname); string newname= "item\\"+ itemname; ifstream getstock; getstock.open(...
[6 replies] Last: DO you have that file opened elsewhere? You cannot (usually) open an a... (by MiiNiPaa)
Temperature
 
Hi guys! Just having a small problem. This code is not running right and im wondering what is the problem. #include <iostream> #include <stdlib.h> using ...
[5 replies] Last: [quote=inspiringnoob]Also I added using namespace std; So then you don... (by TheIdeasMan)
by JanoOr
Passing member function to member functions
 
Hey, it would be really nice, if you could help me with this head aching problem: How can I pass member functions to other member functions? Class Inte...
[1 reply] : Simple example of passing members around: #include <iostream> struc... (by MiiNiPaa)
by Elyril
Input Validation
 
Hey, So, in my program I have to take a start time, the length of the call and the rate in order to output it to the user. The only problem I have is validatin...
[5 replies] Last: You could validate it with regex if your compiler supports C++11, or y... (by LB)
September 2015 Pages: 12345... 42
  Archived months: [aug2015] [oct2015]

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