Beginners - March 2018 (Page 8)

by clbj
calculate molecular weight
 
i cant figure out why that my program is not correctly calculating the molecular weight of atoms. it...
[11 replies] Last: #include <iostream> #include <fstream> #include <iomanip> #include <c... (by lastchance)
by dean
[Macro] Token concatenation operator ##
 
Hi there, I'm still not able to understand how to use the token merging operator ## in C/C++ macros...
[2 replies] Last: ok, so the ## is not required in this case, i.e. : #define PROFILER(... (by dean)
Trouble with Arrays
 
So I am trying to write a code that can take the names and scores of a certain number of people that...
[5 replies] Last: You are working with two different data types for each student record,... (by closed account E0p9LyTq)
by zapshe
Using string with advantages of regular cin?
 
Hi - I've coded this calculator. In int main() I'm using "e" as a char so I can use cin.putback(e) -...
[10 replies] Last: This calculator was just something I made so that every time I learned... (by zapshe)
Concatenate Multiple "char*"s
 
I'm having trouble with some code I'm writing that takes user input from a the console and concatena...
[6 replies] Last: I example I quoted above, where a container has a number of homogeneo... (by TheIdeasMan)
"error: no matching function for call to 'Dog::Dog(const char [4], const char [5])"
 
I can't figure out what the issue is here. It occurs on line 60(and 61). #include <iostream>...
[2 replies] Last: Line60: The class Dog does not have an appropriate constructor. You... (by coder777)
by zapshe
std::string::npos ??
 
Just overcame a huge obstacle in my code - took a while so I'm worn out. Anyway, in solving this mys...
[2 replies] Last: Ah! i see now, that makes perfect sense. The value of npos IS the high... (by zapshe)
iterate through a vector of strings
 
I'm trying to create a vector by a user entering words, storing these words into a vector, and then ...
[1 reply] : Hi, A few things: The for loop needs to be outside the loop that col... (by TheIdeasMan)
Help with OOP
 
Hello. I am 14 and I have been learning c++ for about 2 months, and I have now gotten to the object ...
[3 replies] Last: No worries, pleased to help :+) There are quite a few very experienc... (by TheIdeasMan)
by milesr
trouble with my char values
 
Hi all. I am taking my very first programming course this semester, so I am very new to all of this....
[3 replies] Last: Hi trying changing this: if (gender != toupper(m) && gender != tou... (by TheIdeasMan)
Loop, and display of table for degrees
 
(The formula for converting a temperature from Fahrenheit to Celsius is C=5/9(F-32) Where F is the...
[3 replies] Last: No need to have a temp variable in your function, you can simply retur... (by closed account E0p9LyTq)
Multiple Inputs
 
For my intro class I have to write a code that allows the user to input multiple integers. For examp...
[3 replies] Last: Let me know what you think of the program that I made for you. In reg... (by ratfus)
Program doesn't work correctly.
 
I cannot find a problem within the code. My highest, average, and total come out to be the correct n...
[3 replies] Last: Alright I got it working. Thank you. It's my first time using this sit... (by noshkren)
by ratfus
Pointer program keeps crashing
 
Why does my pointer to pointer program keep crashing? Shouldn't I be able to point to another point...
[6 replies] Last: PLEASE, learn to use code tags, it makes reading your source MUCH easi... (by closed account E0p9LyTq)
Vectors problem
 
I'm trying to make a program that displays the contents of various vectors, and for the last vector ...
[2 replies] Last: Thanks, this works just how I wanted it to. (by Databend)
binary search comparison
 
Could someone help me figure out how I can get the comparisons of attempts in a binary search. The l...
[5 replies] Last: Have you run the program with your debugger? Set a breakpoint before t... (by jlb)
Overloaded operators and Copy constructor
 
so I have some trouble with my code, not sure if its something wrong with the copy constructor or th...
[1 reply] : This is the Main.cpp (These are just testing cases.I am not allowed t... (by kikiyox77)
Array Loop Question
 
Here is the summary of what I am trying to do. I am building a calculator using functions. I am havi...
[2 replies] Last: Those make sense. I will try revising my code with these to see if it ... (by Cryptic HyRulian)
Pass a .txt File Into a Vector
 
For my class, we need to read in values from a .txt file and input them into vectors to solve for a ...
[4 replies] Last: I'm glad it works OK. Now I look at it more carefully, you do need t... (by lastchance)
For Loop Initiation
 
I need help with DO_2. How do you initialize 2 variables in a for loop? I thought you could only do ...
[2 replies] Last: Hello piotrowskid, Initializing 2 variables in a loop is explained the... (by mycuser)
March 2018 Pages: 1... 678910... 29
  Archived months: [feb2018] [apr2018]

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