Beginners - June 2015 (Page 20)

by i9try
SORT LIST OF OBJECTS
 
How can I sort a list of objects by using a variable inside the class? #include<iostream> clas...
[5 replies] Last: calculate it using your other variables. Edit: oops sorry i re-read w... (by mutexe)
by fdsgjj
Counting prime numbers
 
#include <iostream> using std::cout; using std::cin; using std::endl; i...
[1 reply] : You have the right idea. You can speed it up by lowering the loop limi... (by dhayden)
by zecbmo
Object does not name a type. Declared in the same header
 
So I have created a class. And declared an array of objects based on it. When running the program ...
[1 reply] : You need it to be in main. lines 28 and 30 shouldn't be floating aroun... (by mutexe)
Reversing Arrays Using Recursion
 
Is there a way to reverse an array by ONLY passing in the array? It seems that it is pretty easy if ...
[4 replies] Last: @cire I understand. Thank you so much! Best regards, Jae Kim (by jhykima)
by i9try
iterator: end-1
 
how can i find the iterator end-1? I want this one: list<Athlete> athletes; list<Athlete>::it...
[1 reply] : use the condition athl<athletes.size()-1 instead of using iterators... (by mutexe)
by Diedes
coupling an int and string together in a node, linkedlist
 
Hey, What this program does (the main), is read a txt file and create a node for every line with a...
[no replies]
write a matrix
 
Write your question here. how can i write a matrix of size m*n? have just started learning c++.plea...
[1 reply] : http://www.cplusplus.com/forum/beginner/42045/ edit: it's good manner... (by mutexe)
What is going on in this program?
 
Can someone please give a trace/breakdown of whats happening in the program below? #include <i...
[12 replies] Last: Thanks, but I think I already understand that now. I even replaced l... (by Arslan7041)
3d game programming
 
I'm not a complete beginner to c++, i do know the language fairly well. I want to make a retro look...
[1 reply] : Download the engine SDK and look through the documentation - if you k... (by Codermik)
Writing the command for getting the average of three numbers.
 
Hi guys, so this is what I've been working on. Our assignment is to write a program that the user wi...
[1 reply] : Try putting your code in code tags. The current program wouldn't com... (by Codermik)
by Ch1156
Why cant I pass this array to the function?
 
I am making a small console game and I made the map, and an working on putting things into functions...
[8 replies] Last: How does this output the map? It does produce exactly the same outpu... (by keskiverto)
C++11 move semantics
 
Hello forum, I think that the C++11 move semantics only applies to the class that has member wit...
[2 replies] Last: > If there are is no member of the class has pointer type & reference ... (by JLBorges)
by Winsu
strange output
 
According to my code I was expecting to have the option of entering the variable sex..but in somehow...
[2 replies] Last: @rafae11, you should always add supplementary explanation to your ans... (by shadowCODE)
I don't know whats wrong with my code.
 
my code gives me a runtime error "vector iterator not incrementable" here is my code and I'm pret...
[4 replies] Last: You do advance the counter whether you erase an element or not. That ... (by keskiverto)
switch, constant expression
 
I have declarated this: const int peasant = 300; const int footman = 900; const int ar...
[6 replies] Last: It would probably help if you showed the complete class definition and... (by jlb)
Help with string array?
 
Your program compiles cleanly (at least the second copy of it). What help do you need? PLEASE USE ...
[no replies]
by Winsu
Inheritance
 
I have a base class, and two derivaded class from that one...what I want to do is to have a class w...
[5 replies] Last: my idea is that GRADUATE person is somebody who is student while he i... (by Winsu)
cin.get proplem
 
HELLO THERE i used this code to assign variable form user input and show what he entered int a = c...
[4 replies] Last: You may want to use your favourite search engine and search for "ASCII... (by jlb)
Using dynamic array function but can't figure out size
 
I know that a vector would solve all of my issues, but the chapter is on pointers and I have to make...
[6 replies] Last: Wow. I attempted that before even posting the question, but my syntax ... (by D0CHollywood)
std::map
 
This is my first time to use std::map and it wasn't very successful. Could somebody help with this c...
[8 replies] Last: C++98 is not a compiler. It is the first official C++ standard. It se... (by keskiverto)
June 2015 Pages: 1... 1819202122... 32
  Archived months: [may2015] [jul2015]

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