General C++ Programming - October 2014 (Page 37)

by RotciV
expected primary-expression before
 
I am wondering why I am getting an expected primary-expression before 'remainingNumers' and expected primary-expression before 'lastNums' in line 23. Can you gu...
[5 replies] Last: If it is created in another function, that means that it is local to t... (by Ispil)
Size of std::forward_list
 
I'm reading The C++ Standard Library (2nd Edition) (Nicolai M. Josuttis). Arcording to the book content, forward_list does not support function or method to co...
[1 reply] : The proposal by which it was added to C++ was http://www.open-std.org/... (by Cubbi)
Network programming?
 
hey everyone, how to use c++ to program network for a multiplayer online game or how would i go about this?
[5 replies] Last: thank you everyone! ^_^ (by Dakiaiu)
Help please
 
Hello guys i need some quick assistance please I'm writing a code which goes as follows : the program will prompt the user to enter a every student's first an...
[no replies]
Private Global Variable to Class?
 
Hey guys I want to make a destructor counter...So it needs to be outside that specific instance of the class. And i want to keep it hidden. I don't want to be a...
[8 replies] Last: What does your code look like? (by ResidentBiscuit)
A quick question on my code.
 
Thanks for the help everyone!
[4 replies] Last: Note: You have a recursive function. You could have a while loop inst... (by keskiverto)
Interface Class
 
If I understood correctly an interface class is an abstract class that does not contain any private functions. And an abstract class is a class that contains...
[1 reply] : If I understood correctly an interface class is an abstract class tha... (by kbw)
Inflation calculation for two years code <Need Help>
 
#include <iostream> #include <iomanip> #include <string> #include <cmath> using namespace std; void inflation(); void increase_decrease(); void ma...
[1 reply] : 1) Please use code tags to make your code readable: http://www.cplus... (by MikeyBoy)
Stuck on a metaprogramming problem
 
The following function inRange, which returns true only if 'value' is among RANGE... works correctly: #include <iostream> #include <type_traits> enum Ability...
[2 replies] Last: template <int KEY, int... RANGE> struct Map {}; // one-to-many map (m... (by JLBorges)
"A custom array class", and "dynamic array vs. dynamically allocated array"
 
Hello! I have written a generic class as an alternative for <std::vector>. I can't access the full code right now, but here is the gist of it: template<t...
[4 replies] Last: All right, thank you. (by RotatingAxis)
by anhnha
Function passed by pointers or reference
 
Hi again, I learned basic about C and C++ but my programming skills are bad. I am going to read some codes about image processing and I need to understand func...
[11 replies] Last: According to the function prototype, I think it should be passed a and... (by anhnha)
Virtual Table
 
Consider the following classes : class A { int a1; public: virtual int A_virt1(); virtual int A_virt2(); }; class B ...
[3 replies] Last: a->A::A_virt2(); will call A::A_virt2() no matter what class the o... (by Peter87)
by wdpats
Why is thi not working?
 
#include <iostream> #include <fstream> #include <string> using namespace std; void main() { string pdtname; int index=0,qty=0,price=0; ifstrea...
[4 replies] Last: The problem you are having is that "Baby Oil" contains a space. When ... (by doug4)
Getting vector with a pointer
 
I really don't want to use a pointer here, but I think I have to. My problem is that I have two classes that both need members from each other, so I need to use...
[3 replies] Last: I solved it using a method I am using to pass another object around to... (by wh1t3crayon)
by judo11
ignoring problem in C++
 
This is just the portion of my program. This program displays Not Found even if the id number is found. void search(void) { char ID ; int i, found;...
[1 reply] : Your snipped is not complete, so it's hard to follow your operations. ... (by hellhound)
Dynamic Allocation for Arrays
 
I need help figuring out the code to allocate the memory for my arrays in the create array function. #include <iostream> #include <cstdlib> using namespa...
[1 reply] : Please use code tags when posting code, to make it readable: http://w... (by MikeyBoy)
by SaQi
How to move a ghost in PacMan game randomly around the maze?
 
I have tried rand() for x and y positions of ghost but does not work. it moves but not randomly it follows same path every time I run the code.
[2 replies] Last: I have done it but still it follows the same path :( (by SaQi)
Sort Function won't work
 
#include <iostream> #include <iomanip> #include <cstdlib> #include <string> #include <ctime> #include <algorithm> using namespace std; const int s =...
[1 reply] : while(check == true) { if (n == p) { n = 0; m... (by Ispil)
by JDS
Compiler help
 
Help please I think my code is right but i get these errors in my client (int main) file 1>------ Build started: Project: ConsoleApplication60, Configuration...
[3 replies] Last: You see all those functions that it is giving you an error for? The co... (by Ispil)
Calculating Change
 
I'm new to C++ and am having trouble with programming the output of the change after finding the differences between the price of the item and how much the user...
[1 reply] : Stop. Just look it up, this is like one of the most highest homework q... (by poteto)
October 2014 Pages: 1... 35363738
  Archived months: [sep2014] [nov2014]

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