Beginners - January 2016 (Page 22)

cout Last character of string input of any word/phase enterd by a user.
 
/*Allow user to input any thing in a array. Display the last entered character on screen. The program should also allow the user to search any character or phas...
[2 replies] Last: Yes. You need to show at least some initiative to get actual help. Any... (by GameDevAnurag)
How to make exit button???
 
I wrote an factorial calculator and I did an if statement in do loop . It works but it won't close!! here is the code: #include <iostream> #include...
[2 replies] Last: i did it like this: #include <iostream> #include <cmath> using namesp... (by ehsan687)
by kmce
printf(), age question
 
when i run this code and put in an age it gives me a large negative number back, Im really new to learning c++ so stuck on simple questions sorry, if anyone cou...
[1 reply] : You've gotta tell printf what to print! printf(" I see you are %d ye... (by wizebin)
Odd request. Sorry :(
 
Hey folks I'm hitting the brakes on my C++ progression and going back over some of the basics that I was either not fully competent with or feel like I missed s...
[16 replies] Last: Pointers provide a level of indirection. Let's say you have three clas... (by xismn)
Need Help how to check for letters!
 
I have a question on how to check if a certain letter of a string is a letter or a number. I want the user to input a single letter. If they do not I want the...
[2 replies] Last: http://www.cplusplus.com/reference/cctype/isalpha/ (by Moschops)
by bbnp
inappropriate termination in loop
 
The program works the way i want it to but the only problem with it is that when the user guesses a non integer i will like to output to console cout << "You...
[4 replies] Last: while (cin >> userGuess) // while input extraction is succes... (by cire)
Using variables created in function into the main
 
Hello. My question is rather stupid but anyway: What are the ways so the main has access to the variable created in a function and vice-versa? Here the problem ...
[6 replies] Last: Another relevant question. If I want to return more than 1 values can... (by Moschops)
How to return error in function
 
I'm a bit confused on how to return an error with a complex data types, like my Vector of strings, would I just send a specific vector and let a simple if state...
[6 replies] Last: If it's part of a class, you could have a class boolean member errorS... (by Moschops)
C++ How to store a previous value of a variable and update it for comparasion?
 
So there is a variable sensor.value which ranges anywhere from 1 - 1000. How would I capture the sensor.value's number initially so i can compare it to its ...
[3 replies] Last: In C++, static doesn't mean not changing. (by Moschops)
#ifndef inside a function
 
Hi, I was checking out how #ifndef is working in a header files but couldn't think of away to actually check if they are not tried to include twice even with ...
[3 replies] Last: Thank you guys, everything is clear now :) (by etrusks)
Calculating in a array
 
I need to create a function that calculates the total points from my variables and it goes through it 3 times. any ideas? my val are test, driving1 and driving...
[2 replies] Last: How do i make a function which calculates the var i have. (by ruslansbest)
by shaven
why cant i debug??i confuse..
 
SYNTAX: int main() { float M ,Cond3,Ch ,Remain,X ; M =4; M =6; X =M +M ; Ch ='B'; cout<<Cond3<<endl<<endl; Remain=X %4; cout<<Remain; cou...
[5 replies] Last: you could use fmod http://www.cplusplus.com/reference/cmath/fmod/ (by Moooce)
by vjanu
How to Do using functions?
 
#include<iostream> #include<cstdlib> #include<iomanip> using namespace std; int main(){ int courseNo,marks; cout<<"Please enter your Course Number: "; c...
[2 replies] Last: To refactor('function out') code: -First select the portion of code to... (by Aceix)
by vjanu
c++ question ...Help me plz
 
Write a program to find the Root Mean Square of a series of numbers. You are required to enter a set of positive numbers ( integers) terminated by -99. Use si...
[3 replies] Last: So show us what you've done. Use code tags - http://www.cplusplus.com/... (by TarikNeaj)
If function problem
 
My question is how do i make the if to check if the input is lower than 90 to "Fail" and exit the code and if its greater than 90 to continue the inputs. Lines ...
[2 replies] Last: Thanks! <3 (by ruslansbest)
Funcion not matching error
 
I get a error on line 84 don't know what i'm doing wrong any ideas? Thanks #include <iostream> #include <fstream> #include <iomanip> #include <cstdlib>...
[2 replies] Last: Thanks man you're awesome! (by ruslansbest)
Not saving in a file
 
I have no idea where is my problem, if you see any other problem with the program please let me know, Thanks! #include <iostream> #include <fstream> ...
[2 replies] Last: Thanks man! (by ruslansbest)
write file to directory
 
How do i write to or create a file to a specific directory using fstream?
[6 replies] Last: Awesome! Please marked this as answered. (by koothkeeper)
Struct+Array? could someone help me please?
 
First, i'm very sorry for my poor english. This program is in indonesian language. I'm making a program about money loan. I made the structure "for" to make i...
[1 reply] : anybody please? i need this as soon as possible :( (by fauzeus)
problem
 
A city has many attractions,do my constructor need attractions vector as parameter? class City { private: int id; string name; int pop...
[16 replies] Last: The example demonstrated a simple system for implementing references. ... (by Shadowwolf)
January 2016 Pages: 1... 2021222324... 29
  Archived months: [dec2015] [feb2016]

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