Beginners - February 2017

adding another dimension with 2d pointer array
 
Hi I'm trying to add yet another dimension to my 2d pointer array I want each element for example ray to now point to 4 new ints here is my 2d pointer to poi...
[2 replies] Last: its easier to go the other way when you need to reshape. So you can a... (by jonnin)
constructor
 
not compiling. does anyone see an error? it tells me i need a semicolon but i added one #include <iostream> using namespace std; class logbook { ...
[5 replies] Last: THANK YOU EVERYONE! (by Mediumgrit)
Why do we need two asterisks when we want to pass a sequence by reference?
 
I know that when you want to pass something by reference you are basically using pointers to point to the address of the data type. So when you want to pass an ...
[3 replies] Last: thank you, I just realized that what I was asking made no sense becaus... (by idknuttin)
0.6 --> 0.60
 
Hello, I have one array saved in a float with one saved space as 0.60 but when i use the command cout it always comes as 0.6 is there a way i can make the 0 ap...
[2 replies] Last: Hello Nickoblack, In addition to what Thomas1965 said, look into this... (by Handy Andy)
*& operator
 
Hello everyone! I'm in trouble at figuring out what that operator is , what does it mean , where can be used, its restrictions and its importance? I mean, don't...
[3 replies] Last: Where T is some type, the derived type T& is 'reference to T' Whe... (by JLBorges)
polymorphism code not doing what I want
 
Hi guys I want to create an array of monster objects and have each individual monster attack for example a ghost object should use it's attack,I set a virtual f...
[7 replies] Last: thanks Kemort,that's the first time I've heard of slicing something ne... (by adam2016)
by danciu
includes()
 
What is the right answer in a school test, for the code below: a. runtime error - Line II or b. 1,0 thank you. #include <deque> #include <iostream> ...
[4 replies] Last: although I use includes() function in a wrong way. Did you? include... (by Enoizat)
for loop table
 
(First of all , apologize for any mistake in english writing) Good day, I need some tips/help printing out a table into the console , using a for loop, what i ...
[1 reply] : Hello Nickoblack, PLEASE ALWAYS USE CODE TAGS (the <> formatting butt... (by Handy Andy)
by danciu
set_difference()
 
In a school test, the code below is a: a. runtime error or b.0,3,9,2,0,0,0, thank you. #include <vector> #include <iostream> #include <algorithm> usi...
[6 replies] Last: Nevertheless, the given equivalent code gives a defined outcome in t... (by Chervil)
plotting momentum distribution of fastest particles in fastest jet formed in pythia8 with fastjet
 
I am using Pythia8 with fastjet.I need to plot momentum distribution of fastest paticle in fastest jet formed in 1000 events of pp collision.I am not able to ac...
[1 reply] : And how do you think that C++ programming knowledge can help you out? ... (by closed account 48T7M4Gy)
Number Guessing Game (Constant Ints Problem)
 
I need to initialize a set tries count as a constant value and implement it into the game as the max amount of tries for the game. Any help is appreciated. Than...
[2 replies] Last: Line 25: Don't have tries as a const int, instead leave it as a int va... (by Hengry)
Need help drawing shapes
 
I am new to C++, i have this assignment for my programming class in which i have to draw kind of a diamond with '*'. The thing is: it works, but it also draws a...
[1 reply] : New algorithm that works : #include <iostream> using namespace std... (by Mantorr22)
Changing direction towards a different object
 
I'm in the process of putting together some pseudo-code, trying to read through my professors code (he doesn't comment much) and just general planning for an up...
[5 replies] Last: Thank you for all your help Kemort. Between what you've said here and ... (by Miles Hikari)
need help getting a error
 
need help trying compile the program but getting this error on line 107 expect '}' at the end of input. #include <iostream> #include <iomanip> #include <cstdli...
[1 reply] : If you use code tags via the <> in the toolbar on the right then the o... (by closed account 48T7M4Gy)
Noob at C++ Need help with class
 
Hello all, I'm taking a C++ class in college and I'm really starting to dig it. I am, however, very new and inexperience with C++ and programming in general. I'...
[5 replies] Last: Declare then as integers (they are whole numbers). When performing the... (by JLBorges)
How to define the function?
 
I keep getting 3 errors unresolved external symbol "void __cdecl showValues(int * const,int)" (?showValues@@YAXQAHH@Z) referenced in function _main. I looked up...
[6 replies] Last: I just got it. You were correct thank you very much for the help! (by CisntEZ)
C++ error function not defined? How to fix any guidance welcome
 
I keep getting 3 errors unresolved external symbol "void __cdecl showValues(int * const,int)" (?showValues@@YAXQAHH@Z) referenced in function _main. I looked up...
[3 replies] Last: nvm! I got it ! Thank you very much for your help! Much appreciated. (by CisntEZ)
by Meden
Sieve of Eratosthenes fstreams
 
I am trying to write a Sieve of Eratosthenes using files to append and retrieve primes. The purpose of this program is for me to gain an understanding in how t...
[3 replies] Last: Actually I just found something interesting that might explain the pro... (by Meden)
by sw007
creating actual svg image
 
Could someone point me in the right direction for turning this code into an actual image using svg? I know the first line of an svg file has to be <svg xmln...
[1 reply] : I'm not exactly sure what it is you're asking. An SVG file is an XML t... (by helios)
function
 
can I have some help with this code. lets say i enter 6 #include <iostream> #include <iomanip> using namespace std; double series(int n); int ma...
[2 replies] Last: Hello newyork23, In addition to what AbstractionAnon said about line ... (by Handy Andy)
February 2017 Pages: 123... 37
  Archived months: [jan2017] [mar2017]

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