
please wait
by armando2
Beginner C++
|
Need to learn C++. Exactly with what to start I need to know what to start doing to learn C++. I have learned some beginner tutorials like(strings variables... |
Feb 6, 2016 at 11:00pm
[10 replies] Last: http://www.learncpp.com/ It has exercises at the end of each lesson. (by RUNNER PRO AGARIO)
|
Read stdout from another console application |
Is it possible to get stdout data from another console application? Or, run two consoles from one c++ program? |
Feb 6, 2016 at 10:37pm
[3 replies] Last: Start a command prompt and type dir \windows | more This will execut... (by dhayden)
|
by curseofcj
inputting into a 2d char array
|
The assignment is to read from a file, put the first two words into a single row of a 2d char array, and the next two numbers into a separate array. My issue is... |
Feb 6, 2016 at 10:21pm
[5 replies] Last: I suggest you stop using C-strings and stick with std::string: std::... (by jlb)
|
by nenko182
Vector to vector without repeating elements
|
Basically, I have a vector with 10 elements, and I need to create another vector with 6 non-repeating elements, taken randomly from the first vector. Kind of li... |
Feb 6, 2016 at 9:33pm
[7 replies] Last: Sorry, I assumed that your source vector has no duplicates. (by Duthomhas)
|
by Skorchy
Printing symbols using a for loop
|
Hello! I am taking my first ever coding class, and we are using C++. I kind of understand how a for loop works, but not for the purpose that I am trying to acco... |
Feb 6, 2016 at 8:37pm
[4 replies] Last: That's exactly what I needed. I ended up figuring it out on my own, bu... (by Skorchy)
|
by Pdsnowden
calling a class function in main but it's declared in it's own cpp
|
in my class.h i have. class AddressBook { private: string firstName; string lastName; int streetNum; string streetName; string city; string state; ... |
Feb 6, 2016 at 7:13pm
[1 reply] : setFirstName(temp); You need an object to call the function., like:... (by Thomas1965)
|
What is the purpose of the auto keyword? |
I understand that auto can be used with functions that have return values, but why do people use them in things like for each loops. Wouldn't typing the data ty... |
Feb 6, 2016 at 6:20pm
[2 replies] Last: Great Article, Thanks Cire! (by RUNNER PRO AGARIO)
|
by Anybus
Question about strings!
|
Hello I have a question! Let's say that I have : std::string words = { "guy21", "town6", "1street" }; How do I get the numbers 21,6,1 out as int so that I... |
Feb 6, 2016 at 6:04pm
[3 replies] Last: #include <string> #include <vector> #include <iterator> #include <sst... (by DeathLeap)
|
by DeathLeap
Vector of string to Vector of Char
|
let's say I have a vector of string: vector <string> words; this vector contains the words: you are pretty How can I convert these two words into a vector <... |
Feb 6, 2016 at 5:45pm
[5 replies] Last: Here's another way to do it. #include <iostream> #include <numeric> ... (by cire)
|
by newUser3940
Difference between two programs
|
I've been messing around with my code from this topic cplusplus.com/forum/beginner/182322/ until I managed to get it to work #include <iostream> #include... |
Feb 6, 2016 at 5:13pm
[2 replies] Last: Thanks, now it has been corrected. One other comment, an error in my ... (by newUser3940)
|
by ZahoorKhan
Problem in Switch-Statement.
|
I am facing a little problem in switch-statement, as we can use integer in our switch statement than why second program is not working. First Program:- ... |
Feb 6, 2016 at 3:39pm
[4 replies] Last: Thanks #TarikNaej and #dhayden (by ZahoorKhan)
|
by Boneman
How do I let variables change based upon a string entry?
|
Hi! I'm setting up a fight system for my text adventure/rpg, and I got random rolls to meet different enemies working. But I'm stuck trying to find out how to c... |
Feb 6, 2016 at 3:16pm
[7 replies] Last: Would be cool to see next projects like this from you! And keep learni... (by etrusks)
|
by etrusks
Visitors - are they even useful?
|
Hi, I just read about "visitors" in Stroustrups book in context of polymorphism. Fo example class Visitor; class Shape{ public: virtual void accep... |
Feb 6, 2016 at 2:51pm
[14 replies] Last: n other words, try to push the interface functions as high up the tre... (by cire)
|
by verzhen1
conversion code error
|
Hello, First option km -> m option works but the second option m-> km doesn't work. Please help me figure out why it is not working. //m-km converter ... |
Feb 6, 2016 at 11:45am
[2 replies] Last: Ah okay. I understand. Thank you very much for your advice. (by verzhen1)
|
by PSYCHAMERON
What if * and ++ are applied on a pointer at the same time?
|
I cannot explain the output of the program. ++ has an higher precedence than *, but how can you explain the following output, especially the last two lines: ... |
Feb 6, 2016 at 10:39am
[4 replies] Last: #include <iostream> struct pointer { pointer( int* p ) : ptr(p) ... (by JLBorges)
|
by DeathLeap
reading strings and ignoring symbols
|
I am trying to do this: a user would input: SEND + MORE = MONEY I want to read the three words without the '+' and '=' and put them into string1, string2, st... |
Feb 6, 2016 at 9:31am
[5 replies] Last: isalpha is a function returns true if the character is alphabetic (a, ... (by PSYCHAMERON)
|
by Bajista19
wrong input handling
|
Hi can you help me with my code. What I want to happen is it loops when it enters an invalid input, so far so good except when I enter something like "4a" it ac... |
Feb 6, 2016 at 8:51am
[2 replies] Last: #include <iostream> using std::cout; using std::cin; int main() { ... (by integralfx)
|
prime number |
I was trying to do prime number detector but when I entered "2" it didn't give me a outprint. And when I entered multiples of prime numbers (25, 9..), it print... |
Feb 6, 2016 at 8:18am
[3 replies] Last: Oh yeah, because it's an if else statement, so the for loop never exec... (by pnoid)
|
by skadush
OffsetOf getting wrong value
|
struct SSomeData { char mcChar; double mdDouble; bool mbBool; }; int main() { using namespace std; cout << "Offset of mbBool = " <<... |
Feb 6, 2016 at 7:10am
[1 reply] : OffsetOf getting wrong value Any time you find yourself saying somet... (by cire)
|
by vyneroon
c++ * / decimal issues
|
Pretty much all i need to know is how and why when i do my calculation for monthly interest it does not use decimals to a high value such as 10. I have tried u... |
Feb 6, 2016 at 5:51am
[2 replies] Last: Thanks a lot! I thought what i was doing was taking X and then stating... (by vyneroon)
|