Beginners - July 2016 (Page 23)

Guessing Game (1,2)
 
Im creating a quite simple guessing game, and i keep getting a error, im sure its something very stupid. Any help is appreciated. #include <iostream> #...
[20 replies] Last: Good to hear :) (by Naughty Albatross)
by Tonlee
I don't understand a simple scheduling problem
 
suppose we have the four jobs: j1, j2, j3, j4 and associated running times: t1=15,t2=8,t3=3,t4=10 only one processor schedule 1:j1->j2->j3->j4 0->15->23->2...
[1 reply] : 1: j1->j2->j3->j4 t1=15,t2=8,t3=3,t4=10 0->15->23->26->36 avg time : ... (by Naughty Albatross)
Machine Problem File Reading
 
I'm working on my homework for my online introductory programming class and honestly I got a little behind so I'm struggling trying to figure out all the machin...
[2 replies] Last: That worked, thank you! (by fcailin)
C++ If-else Function Question
 
I have a homework assignment that I am a little stuck on. Here are the instructions: Write a function bool IsOddDigit( char ch ); that takes a character and ret...
[4 replies] Last: If - Else example #include <iostream.h> #include <math.h> int main(... (by happycodings)
by elay
static definition error
 
game.h: class Game { public: enum difficulty { A,B,C } static difficulty getGameDiff(); private: static difficulty diff; } game.cpp: #inclu...
[6 replies] Last: i dont know why it allows the diff to be defined that way just by putt... (by elay)
by darje
need help with linklist
 
lets say i have 1 linklist with diffrent numbers how can i make 2 lists from 1 single list 1 list to odd numbers and the second one from even numbers. tnx f...
[3 replies] Last: tnx for help .. void List::fix(const int & num){ Node* now = new No... (by darje)
Having trouble validating file names
 
Far from done but right now I am trying to get this program to ask for file name and store it in string then convert to ifstream and then check if file is valid...
[2 replies] Last: Actually you can't convert a string into an ifstream. You can create a... (by Thomas1965)
by stas76
for loops
 
Hello, I'm studding c++ by S. Prata book. And there is such exercise "When you join the Benevolent Order of Programmers,you can be known at BOP meeting...
[2 replies] Last: Thanks :) (by stas76)
Find the amount of time between dates-times
 
My task for this program is to have a user prompt in two dates and times. The first being the starting date and time, the second for the ending date and time. ...
[16 replies] Last: Just to make sure, the 'code bloat' comment referred to the previous u... (by closed account 48T7M4Gy)
by D22
passing Struct Arrays between functions
 
For a program I have to pass a struct within an array to the main function and then to another function that will display it, but the numbers and strings don't ...
[1 reply] : but the numbers and strings don't come out right Are you going to sho... (by closed account 48T7M4Gy)
Objects crossing screen boundaries
 
I working on my an asteroids game and I'm trying to make where objects that leave the right side of the screen appear on the left and so on. My boundaries go...
[5 replies] Last: ah, it seems like the vertices of each asteroid cross the screen one b... (by Kaisky)
Call function with same name for every object
 
I have about 12 classes, with a variable number of objects each. they all have a function called update() is there a way to call update for every class with...
[3 replies] Last: Put them in a container, iterate through the container, and call updat... (by Arslan7041)
How to share libraries through several header files?
 
Hello, I have decided to header files to help clean up my code. The thing is, that in my header files, several functions use the same library. To my know...
[2 replies] Last: Oh I see, thank you for clarifying this. (by sakonpure6)
by Kaisky
Destructor causes error upon delete double array (1,2,3)
 
Hi! I have a class "VEC". It looks like this: class VEC { public: VEC(); VEC(int); VEC(int, double*); ~VEC(); double get(int); void set(int, double); ...
[44 replies] Last: thanks! I love you and your patience! <3 /closed (by Kaisky)
What is this type?
 
I've read about function pointers and now I'm coming across lambda expressions in my C++ primer book. It's mentioned that any callable object can be passed to a...
[3 replies] Last: http://stackoverflow.com/questions/7951377/what-is-the-type-of-lambda-... (by Thomas1965)
Boost filesystem runtime error!
 
I can not find the cause of this error, the line I think the error occurs on is: for (boost::filesystem::recursive_directory_iterator iterator(directory);...
[4 replies] Last: namespace fs = boost::filesystem ; static bool filtered_in( const fs... (by JLBorges)
by igor96
While loop
 
Hello, I have a problem with the while loop. while(!feof(f)) { ucitajStudente(f, &(studenti )); } Instead of running the function unti...
[9 replies] Last: Oh, glad it helped :) (by Naughty Albatross)
Assignment operators overloading in C++
 
I saw an example about how can you switch the information between two objects. I understood the first example, but I wanted to make another example, and don't w...
[11 replies] Last: Have a good day :) (by Naughty Albatross)
how can i change two ints with one cin?
 
like the title says, how can I change two ints with a single input? In my program there's two types of vehicles and they have different prices, each vehicle has...
[3 replies] Last: If you want to enter two variables this way is simple enough int x; ... (by Boilerplate)
moving objects without curses.h
 
i wanted to ask is there any possible way to move an object(charecter) to another (x,y) position using only the libraries in the standard microsoft visual studi...
[5 replies] Last: Oh, you're welcome. I didn't realize I was stalking you. Sorry. (by Duthomhas)
July 2016 Pages: 1... 2122232425... 30
  Archived months: [jun2016] [aug2016]

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