Beginners - March 2018 (Page 12)

by Cp9
string accepting only numbers
 
How I can check if credit card numbers contains only of numbers? # include <iostream> # inclu...
[2 replies] Last: if ( creditCard.find_first_not_of( "0123456789" ) == string::npos ) c... (by lastchance)
How to access the last character in an element of string array
 
I am provided with a coded message, a definition list, and asked to write a program to translate the...
[2 replies] Last: Sorry about that. Here's the code. It's pseudocode though because I do... (by knguyen2081)
How to replace NaN values in text file? (1,2)
 
I'm fairly new to C++ programming and I am working on my first project. The current issue I am facin...
[22 replies] Last: The following is in order of columns: Square ID(GRID ID), Time Interva... (by nicholasjb1996)
Square root
 
i need help finding square roots without the math library. what im using is this //square=t...
[1 reply] : root = ((root + square) / root) / 2; Slightly wrong. The Babylonian... (by Ganado)
by zapshe
std::cin and whitespace - not consistent?
 
Alright, I've been having a weird experience with std::cin - hope someone can clarify things for me....
[5 replies] Last: Thanks Peter, that looks pretty handy, I'll make sure to remember it f... (by zapshe)
question about maps
 
i have a question about maps, im working on a spell check i have load dictionary which is going to b...
[1 reply] : I'm not sure if a map would be the best option for a spell-checker, I'... (by Ganado)
Trouble using an input facilitator function to read a list with tabs.
 
Working on a small ungraded assignment for my class and have stumbled upon a problem. We are suppose...
[4 replies] Last: If a string contains space you need to use getline with '\t' as delim... (by Graff527)
Mail Order type application
 
I'm trying to do an application that allows the user to enter a 4-5 character string consisting of a...
[6 replies] Last: So I should be using ==? (by Databend)
what excactly are atrributes in a class?
 
so we got a assignment from school and we have to create a class but I don't quite understand what ...
[1 reply] : Hello king2105, PLEASE ALWAYS USE CODE TAGS (the <> formatting button... (by Handy Andy)
by pevecg
Setting value to dynamic class object
 
Hello, so I am playing around with classes and I pretty much understand them apart from the fact how...
[1 reply] : Nevermind, I realized that when testing this, I didnt initialize the a... (by pevecg)
by pizza
Why Pass String By Reference
 
Hello. I learned that when you pass something by reference not by value, the program doesn't make an...
[12 replies] Last: Even without threads, the function may not be able to assume that the ... (by helios)
Verifying correct input
 
I'm creating a program that requires the input to contain a certain parameter, that being 3 digits f...
[2 replies] Last: Thanks! Works perfectly. (by Databend)
by Fojaxx
Prevent characters from being entered into int variable type
 
Hey, so i spent all yesterday working on a ratio calculator for purchasing items. the program tak...
[8 replies] Last: In most cases, the best (simplest, most straight-forward) way to valid... (by mbozzi)
Visual Studios c++ Square Matricies
 
i am having trouble creating a square matrix with my code. I am not allowed to use the vector librar...
[3 replies] Last: Your question is not entirely clear. On one hand you talk about some ... (by keskiverto)
what excactly are atrributes in a class?
 
I have been googling for 2 hours and I still don't know what an attribute is in a Class. could so...
[1 reply] : https://stackoverflow.com/questions/18282330/c-is-it-correct-to-call-c... (by d1g1talarts)
Vector loops
 
Im not sure why vector d is only getting the "dog" string and not the "catd" string as well. ...
[5 replies] Last: std::string::npos http://en.cppreference.com/w/cpp/string/basic_string... (by closed account E0p9LyTq)
functions and array
 
my codes not working #include <iostream> #include <string> #include <iomanip> using namespace...
[1 reply] : not working Please describe that in more detail. * Fails to compile?... (by keskiverto)
by urby
Why does the output value always equal 1?
 
Hello, I am sorry for a basic question, however, I can not figure out why this function obtains the ...
[6 replies] Last: Thank you for finally showing the relevant code. A compiler says: I... (by keskiverto)
Count the average from an external textfile. (containing strings)
 
Hey, Im trying to make a program with an external .txt file. It should contain First name, last nam...
[8 replies] Last: Thank you! you´re the best! I have to study more.. (by dannehess)
How to use to_string function
 
I am creating a function that takes two integers and adds them returning as the string "a + b = c". ...
[1 reply] : #include <iostream> #include <string> std::string addition( int a, ... (by JLBorges)
March 2018 Pages: 1... 1011121314... 29
  Archived months: [feb2018] [apr2018]

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