General C++ Programming - December 2014 (Page 9)

by mbox88
dynamically realloc 2D array
 
Hello, I would like to realloc a 2D array. I have a counter, itime, it increases each step. Each step, I would like to reallocate my array, keeping the old v...
[3 replies] Last: Can you please explain more about point 4? Disregard that, I misread... (by MiiNiPaa)
Can anyone do this??
 
Implement a Circle class. Each object of this class will represent a circle, storing its radius and the x and y coordinates of its center as floats. Include a d...
[1 reply] : http://www.cplusplus.com/doc/tutorial/classes/ (by pnoid)
Working on this function and I cant figure out why my number 7 isnt working
 
Question is Write a function that will use a RNG to obtain 300 integer values between 32 and 126. The value and the corresponding ASCII character, its predecess...
[2 replies] Last: I actually got it to work. I figured it out. (by bandosj15)
Mac OSX Launch Daemon
 
I have developed a dummy Launch Daemon for Mac OSX that keeps writing something to the console(syslog) every 5 minutes. Now, I want to write an application that...
[7 replies] Last: One option is to use Objective-C++ (makes Objective-C code usable from... (by JLBorges)
I need to add in my code the computation of employee payroll?
 
Hi! i need help in my code,so here's my problem. How can I write in my code the basic pay of the employee will be computed based on his position, clerk is 120 p...
[1 reply] : Use f.e. a std::map (see http://www.cplusplus.com/reference/map/map/).... (by tcs)
searching for errors within a code
 
i use cygwin and i have a program that was returning an error saying "undefined reference" and i figured out that i misspelled a word. how can i search for the ...
[9 replies] Last: thanks @Lachlan Easton, and everyone who replied, i learned something ... (by tazzthetecj)
by joeysx
C++ passing multiple array to function sum using inheritance
 
questions is: write a program using inheritance allow user to enter grades of his students 5~8 students as a base class and compute the sums for each students i...
[2 replies] Last: Grades.h, Line 47: You'r accessing a non existing array item. exams... (by tcs)
by anup30
What happens to pointer if variable is reallocated?
 
what happens to pointer pt when string s is reallocated to accommodate bigger size? does it updates itself or does it points to previous s which is not used any...
[1 reply] : does it points to previous s which is not used anymore This. Do not e... (by coder777)
binary semaphore with NON-busy waiting
 
can someone please help me on how will I be able to program this? So, say I have a process and its placed into the binary semaphore, I can't have the same pr...
[1 reply] : In C++11 (and boost) there is no semaphore but mutex: http://www.cplu... (by coder777)
by smosh
Tic-Tac-Toe Game w/ 2D arrays Help!
 
This the question: Two Dimensional Arrays (courtesy of Dr. Huo) The following program is the base for the game: tic-tac-toe. The main function and progr...
[1 reply] : Alright 1st you Really need to Comment your work! Always good practice... (by Sanction)
Need help making a dart score board source code.
 
So I want to make a code that keeps track of peoples scores when we play darts that is fairly organized. I don't want someone to write the complete source code...
[1 reply] : Use an associative array (eg. std::map<> ) to associate name (string)... (by JLBorges)
Treasure Hunt program (arrays) help
 
In a 5 by 5 board, the user must type in x and y coordinates (e.x 4,5) for treasure, specifically 10 treasures out of the possible 25 board spaces.There is a bo...
[5 replies] Last: i finished. Here is the code. #include <iostream> #include <iomanip> #... (by RaginContagion9800)
by rko786
C4244 warning
 
i can not gid rid of these 3 errors i'm new to this so please take it easy thanks #include <stdio.h> #include <math.h> int main() { ...
[8 replies] Last: I recommend using iostream like this: #include <iostream> #include <c... (by jasonwynn10)
How does one go about...
 
How does one go about Playing a music file that they picked and playing it in the default player? I already have this: #include <iostream> #include <windows.h...
[5 replies] Last: ok, cool. thanks! (by jasonwynn10)
Help please
 
Hi, I'm working on this program and I wanted to know if I was going in the right direction or not. How am I doing? is there something I should do differently? ...
[1 reply] : Repeat Post! http://www.cplusplus.com/forum/beginner/151275/ (by jasonwynn10)
bresenham's line algorithm
 
Hi. I need a program to count pixels for bresenham's line algorithm. I just can't think of how should i write my program, I need it for my uni homework. Doe...
[3 replies] Last: R? Angles? Bresenham's doesn't traditionally have any Rs or angles in ... (by Duthomhas)
Ranged for loop with arrays of arrays
 
int arr ; for (int(&row) : arr){ for (int &column : row){ } } Why do we name it row instead column? int arr Wouldn't this be like ...
[2 replies] Last: int m = { { 1, 2, 3, 4 }, // row 0 { 5, 6, 7, 8 }, // ... (by Duthomhas)
help with int
 
while (number <= 0 || number > 16000000000){ cout << "Please the size of memory: "; cin >> number; } Why does this only accept numbers upto 1600000000 ...
[2 replies] Last: Integer values are constrained by the number of bits they have to stor... (by Duthomhas)
C string style problem
 
Hi, I'm not sure if any one will have the time to take a look at this and help me but I've been working for a couple hours a day on it for three days and I'm st...
[3 replies] Last: I haven't analyzed it carefully to see exactly where your indices are ... (by Duthomhas)
Static linking the boost library
 
I have written a program that uses boost in visual studio 2012. The only boost library I used is filesystem by doing. 1)Properties->Linker->General and add...
[1 reply] : Properties->C++->Code Generation. Change runtime from MD (release) or ... (by naraku9333)
December 2014 Pages: 1... 7891011... 31
  Archived months: [nov2014] [jan2015]

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