General C++ Programming - August 2016

by mvgnum
HELP PLS
 
HELLO, CAN U HELP? DIAGRAM: http://i65.tinypic.com/nbcjmw.png Use the above diagram for Question I. The shaded boxes represent pointers. I) a)...
[4 replies] Last: compiling error :/ (by mvgnum)
Meaning of a lambda expression
 
Hi, I have the following lambda expression and have no idea how to use or what it means: typedef mpl::lambda<mpl::lambda<_1>>::type t1; Any ideas? ...
[2 replies] Last: Got it --- Since _1 is a placeholder expression, then a metafunction ... (by JUAN DENT)
by brackl
Segmentation Fault
 
This is essentially all the code. I am fairly new and am stuck. ReadBig will read a number as a string, It then converts each element of the string to an intege...
[6 replies] Last: int readBid(int number[MAX_DIGITS) { string read; cin >> read; ... (by JayhawkZombie)
Reload weapon in textbased shooter (simulation) game
 
http://hastebin.com/xegaquciga.avrasm I don't get it to work, sorry if the code is a mess.. the combination of tired, new to c++ and trying to find diffent k...
[12 replies] Last: Thanks alot for all the answers! I think i'm starting to get a hang of... (by Janbananberg)
meaning of array reference to 2d array.
 
Hello C++ coders , First of all, I am sorry for the poor subject for this post. I do not what this actually should be called. I have a piece of a syntax that ...
[1 reply] : @gentleguy: That is no answer to: explain what this code does Let... (by keskiverto)
by nishcv
Pacman c++
 
Hi global, iam trying to devolop pacman without using namespace std. As iam a noob in programming and my assignment is to complete the pacman program with a pri...
[1 reply] : you run into frustration if you try your skills in programing with a s... (by closed account 48bpfSEw)
Why is LONG_MAX Values the same as INT_MAX?
 
Why is LONG_MAX Values the same as INT_MAX? I'm also getting error when doing something like: long number = 241421; but It can be fixed by doing long long numbe...
[7 replies] Last: So IT really depends on the Compiler you chosed? On the platform .... (by keskiverto)
by Dkob1
Double check code
 
is there any problem with this, what's wrong? string* greeting() { string s(“Hi!”); return &s; } Is it that string doesn't have type?
[4 replies] Last: why return a pointer and not a reference to? string& greeting() { ... (by closed account 48bpfSEw)
So I did this....
 
#include <iostream> using namespace std; int main() { int x = 240; int y = 463; int total = x + y; x = x + 3; cout << "The Value of x: " <...
[4 replies] Last: But I want to make 240 to 243 but why the total is not responding? ... (by closed account 48T7M4Gy)
Bad integers
 
In C++11, I know I can use fpclassify() to check for invalid floats, but checking for invalid integers doesn't seem to have a corresponding function available. ...
[8 replies] Last: http://stackoverflow.com/questions/6725809/trap-representation http://... (by closed account 48T7M4Gy)
im a little bit lost here about the array
 
im a little bit lost here about the array since i took the intro of c++ 2 years ago. Can someone give me hint of how i should start? im a beginner. thanks! ...
[1 reply] : #include <iostream> int countNum2s(int arr , int size) { int count ... (by Pindrought)
Difference between doing.. for example: long int, short int
 
Difference between doing.. for example: long int, short int and doing long, short?
[3 replies] Last: While you can, I recommend you be explicit about your types. sizeof(s... (by JayhawkZombie)
A program to calculate the number of predecessors.
 
I'm trying to find the numbers in an array that are smaller or equal than each number in the array. I want to be able to check for numbers to the left or to the...
[2 replies] Last: It should check numbers to the left of each element. It can't go over... (by inukshuk)
argument has type const but function is not marked const
 
I am getting the error "error: member function 'listSize' not viable: 'this' argument has type 'const LinkedList', but function is not marked const ...
[2 replies] Last: thanks that worked a charm (by D3strya)
difficulty with definging def outside of class
 
Hi, In the code below I am trying to extract one of the definitions from within a class to be defined outside of the class and am having a hard time doing so: ...
[1 reply] : Are you after something like this: https://ideone.com/pMnXpB ? Made P... (by MrHutch)
Finding the max value in a vector
 
I'm currently teaching myself C++ using Stroustrup's Programming book. Everything has been going well, until now. I'm on the chapter 4 drill, part 6 and have hi...
[4 replies] Last: Thanks for the suggestions. I couldn't get the vectors to work, not su... (by Phoenixeyes)
...
 
...
[1 reply] : AnimalNode.hpp #include "Animal.hpp" class AnimalNode { private: V... (by doug4)
by Raj381
Reading from .in file and giving output to .out file
 
I have created a program that gives result when it receives input from keyboard, which is very old way I know. So I want to know how to open .in Files using fre...
[2 replies] Last: The FILE and related functions are C-languages way of handling files. ... (by keskiverto)
a c++ program to calculate time given the speed and distance
 
Have been on this for 2days, have written it severally but i keep on running into errors . DOnt what to do again.... #include <iostream> using namespace...
[8 replies] Last: #include <iostream> using namespace std; int main() { double sp... (by closed account 48T7M4Gy)
by danciu
c++ const_cast
 
Why the statement below print two values and one address: #include <iostream> using namespace std; int main() { const int i = 2147483646; int *j = c...
[2 replies] Last: thank you (by danciu)
August 2016 Pages: 123... 12
  Archived months: [jul2016] [sep2016]

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