Beginners - December 2017 (Page 8)

How to store and call specific function instances
 
I am trying to program a developer console for a game I'm working on. To test if it worked, I created a test that is a static function for a command. However, w...
[5 replies] Last: Thanks, that seems to work. (by armedturret)
user-defined Header files and classes
 
Are you able to include and use functions from a self-defined header file inside of a class? //inside of Character.h #include "library.h" // this is my h...
[4 replies] Last: @Peter87 Sorry for the late reply, I was busy working on the program w... (by Question8)
by BJK
Delete data from txt file
 
I need to delete data from txt file. My code is not working properly. Where am I making mistakes? I need to delete the person number from the file. int del...
[1 reply] : You shouldn't name a variable like a keyword (delete). On line 13 you... (by coder777)
can non member functions be made virtual in C++ ?
 
can non member functions be made virtual in C++ ?
[3 replies] Last: Which object or objects should control the dispatch? Are you looking... (by mbozzi)
can a templated function be made virtual ?
 
as topic is it possible to do something like this ? class A{ public: template<typename T> virtual Token::pointer_type perform(Token::poin...
[2 replies] Last: What's your actual goal? This looks like an XY problem: http://xypro... (by mbozzi)
Need help using mutator function to set variables in a dynamically allocated array pointer.
 
Hi, I've been stuck on this problem for days. I am using a mutator member function to set variables to a dynamically allocated pointer array. When the display...
[9 replies] Last: That is unfortunate. If you're going to program, you need to get bette... (by Repeater)
class
 
Write a program which read two times (in hours, minutes and seconds) given by the user and calculate the total times that mean addition of two times and convert...
[1 reply] : make an attempt at the code yourself then ask for help, (by adam2016)
by chuvak
Virtual functions: how to call the proper function?
 
Let's say I've defined in my interface, //interface class iClass { public: virtual void display(std::ostream&) const = 0; }; And I have a class ...
[2 replies] Last: Always missing something so elementary, thank you. I was under the im... (by chuvak)
How to overwriting 2 files in 2 arrays and merge them into one
 
Hi! I need some help with my code. I made 2 files .They consist info about telephone numbers and pulses. Now I must overwriting them in 2 arrays and merge them ...
[2 replies] Last: I can't sort my array by brimpulsi (pulses) . Here is my code ... (by Saninani)
single quotes vs double quotes string
 
hey people this is not so much a problem rather than curious question so I run the code below and I get the following error error: ISO C++ forbids compar...
[2 replies] Last: ah ok,so the string class uses pointers internally to chars to represe... (by adam2016)
stuck in infinite loop
 
I'm not sure why an infinite loop occurs it should eventually terminate,personStart is equal to 447 I checked and confirmed this while the loop was running and ...
[8 replies] Last: very nice spot Repeater thats exactly the problem =) I was almost pul... (by adam2016)
random access ofstream
 
Hi guys I am trying to write to a file so I can access it randomly,I will use indexes to get where each persons data members are stored in a txt file however...
[4 replies] Last: hey Enoziat very good point I noticed this too after a while lol,I fo... (by adam2016)
On private class member variable as pointer to double and its application
 
Hi there, I'm actually a bit unsure about the right way to utilize this method. My aim is to store a series of input number via class method into a member vari...
[5 replies] Last: Hi guys! Thanks for the info! I have lot to meditate about now, thanks... (by espoice)
Reading a . txt file and storing into Struct
 
Hello, my good tutors While I was messing with structures (struct), I' ve stumbled upon (ifstream and ofstream). I am trying to make a log-in screen usi...
[1 reply] : First you need to read all the account info into a std::vector. Then y... (by Thomas1965)
Sum of First 10 prime numbers using FOR loop
 
Can someone kindly make me a code
[1 reply] : We are not a code writing service. Better go to: https://www.assignme... (by Thomas1965)
by ermai
Class member function of same type of the class
 
The code defines class member functions of it's type of class, it executes and outputs as below message: constructor printData Spec1 int: 2 Spec2 int: 4 S...
[1 reply] : You did forgot the copy constructor. (by keskiverto)
2D arrays and conway's game of life (1,2)
 
Write your question here. [Hi all, I am brand new to programming but I am having trouble displaying a 2d array and inserting a character in a random location...
[25 replies] Last: I decided to go with multiple if statements since I couldnt figure out... (by sero the hero)
Created Object does not see any of its own member variables.
 
Working with the AGK game engine but I don't think the issue is related to it. it's more about the core code I have an class of a button. It holds a sprite of ...
[6 replies] Last: Thank you, both of you for explaining. (by TheConceptBoy)
48:2: error: expected unqualified-id before 'return'.....please help! thank you
 
My program is supposed to determine what a user's letter grade is from an input value, but it won't run because if this error: 48:2: error: expected unqualified...
[1 reply] : your return statement is outside the main function. (by Yanson)
Deleted.
 
Nevermind.
[1 reply] : MoveCheck moves the player if it is able to be moved. Then you unco... (by cire)
December 2017 Pages: 1... 678910... 23
  Archived months: [nov2017] [jan2018]

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