Beginners - June 2018 (Page 2)

How to loop data into an array
 
When the user enters a number of iterations I want to generate that many random numbers between 0-40 and store them into an array. I have the random numbers ...
[2 replies] Last: I actually managed to figure everything out because of this. Thank yo... (by passiontrip)
Passing same type object by reference?
 
Why is Constructor 2 invoked in CAT func(CAT someCat) ? (After my knowledge) I am not passing any reference to CAT constructor within that function, so the n...
[10 replies] Last: In some ways this is like the Miranda law. My paraphrasing: You hav... (by icy1)
need help with unfamiliar syntax syntax
 
so I've been reading SFML blueprints and I've come across a syntax unfamiliar to me, I understand that the struct is inheriting something but there's that arr...
[5 replies] Last: Curiouser and curiouser! Thanks guys. (by tpb)
Adding a new empty .cpp file to a code base
 
The compiled exec gets a new 30 odd k boost in size. I've enabled all newbie debugging code ans gcc ( ubuntu 5.5.0 )has me on a leash Just adding the empty mod...
[11 replies] Last: I think I've seen somewhere ... found: https://www.centos.org/forums/v... (by keskiverto)
My game made by boredom
 
What about my mini-game has a lot of potential if you ask i built it in 10-15 minutes , i really had fun doing it #include <iostream> using namespace std;...
[5 replies] Last: case 'b' is not correctly entered after 'a' has already been previousl... (by Ganado)
by ATh
Rookie
 
Need suggestions. Recently, i completed reading and practicing C++ programming book thoroughly(all chapters 1- 20) of Tonny Gaddis 6th Edition on VS 201...
[1 reply] : If you still consider yourself a beginner, then don't get a job with c... (by Manga)
SDL2 timers
 
Not sure if this belongs in this forum, I apologize if it doesn't. I'm working with SDL2 and have made some pretty good ground. I'm stuck trying to draw some...
[5 replies] Last: If you decide to use SDL_AddTimer just be aware that the callback func... (by Peter87)
by jcarbo
simple g++ makefile on Windows.
 
HI folks, I'm trying to figure out why my makefile doesn't work. I'm using GNU on Windows 7. The error I get is Makefile:8: *** missing separator. Stop....
[1 reply] : Recipe lines must start with a tab. You're missing the initial tab on ... (by tpb)
by mnai
If this isn't a nested function then what is it?
 
So i know in c++ you cannot right nested functions. But in this code ive been following GetGuess() is called in PlayGame() then i call PlayGame() in main and it...
[1 reply] : Correct. A function can even call itself. That is recursion. Note: ... (by keskiverto)
Calling a function that was stored in an array
 
I have stored the name of some functions in an array, but now I need to use those functions. When the user chooses a function to access, how can I use the funct...
[6 replies] Last: Similar idea of same-signature method map, but feels like cleaner synt... (by icy1)
Issue with user input
 
All variables are declared properly. For the input for the webpage name, I cannot enter anything with spaces. I've tried putting it into a character array and...
[3 replies] Last: For some reason, when I try what mbozzi said, it skips over the line. ... (by User55009)
accessing a object array
 
Hi everyone, part of my assignment requires me to 'unfriend' my overload << >> operator and use set/get to access private variables. I've successfully converted...
[4 replies] Last: at these point everything seems to be alright to me (please point out... (by icy1)
by bkara
how to open file from user inputted directory location (1,2)
 
Hello I have posted this question before but I didn't get much help(i think the person got confused with what I was asking for), I would like to write a progra...
[30 replies] Last: My pleasure! (by H00G0)
2D/3D point Distance to origin Problem
 
Hello, I am trying to write a program that calls methods from a base class 2D point and uses these methods in a derived 3D point class. I believe I have all of ...
[8 replies] Last: Or something like: template <size_t N> class Point { double data {... (by keskiverto)
c - square roots with arrays
 
I know it's dumb of me to ask, but how do I make a program that calculates the square of the elements of an array of 10 numbers?
[8 replies] Last: Then just do square root (raĆ­z cuadrada), sqrt(). Your variable name ... (by Ganado)
by ysf007
How to create many binary file within a loop ?
 
This code was written, which take a directory then look for the files inside. it aims to create binary files for each file found by taking it filename. I want t...
[6 replies] Last: The task is to loop through files like images in the dir the names ch... (by mbozzi)
by JayGln
convert struct to class
 
Good afternoon, I'm trying to switch this code from a struct to a class to get some practice in, I have hit a road block and unclear of what i'm trying to do...
[9 replies] Last: less Java and more C++ and you'll be fine ;D (by icy1)
how to use sscanf_s
 
In the code below you will see I am trying to run a sscanf_s to extract data from a string line. I am not sure why it is not working any help appreciated. It is...
[7 replies] Last: THANK YOU:) since i needed the trailing commas I just added another ... (by akarbarz)
by gdz98
the use of string methods (1,2)
 
hi guy I m doin some exercises from the "jumping into C++" bool and this chapter is about strings. the problem I m trying to solve asks me to make a program whi...
[21 replies] Last: ok guys the the biggest issue was my 18th line of code... once put "i=... (by gdz98)
OSX: Can't compile anymore
 
For some reason I am now unable to compile even a simple hello world, in my mac, using g++ (or clang++ or anything fwiw). The last thing I recall I did was i...
[2 replies] Last: Um... do you understand what the problem was? Do you understand why w... (by MikeyBoy)
June 2018 Pages: 1234... 19
  Archived months: [may2018] [jul2018]

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