
please wait
how to make a priority queue/min heap |
im working on a program and what i have to do is pass in process time of jobs into a priority queue processing min time jobs first. there is also a high priorit... |
Nov 2, 2014 at 11:01pm
[9 replies] Last: @danghotties Ok now it's starting to make more sense ima go try it se... (by andrewthecoder)
|
by idknuttin
help with storing values and returning two different statements based on how much info was stored.
|
i have a two part question for my computer programming class, the first part i already completed, i had to create a program that allows the user to enter any in... |
Nov 2, 2014 at 10:40pm
[1 reply] : line 19: cin is looking for user input. doens't seem to be desired her... (by soranz)
|
Simplifying switch cases |
The code below is a section of the switch statement that I want to simplify. Between comment (1), you can see a code that checks for sequence of numbers in a st... |
Nov 2, 2014 at 8:00pm
[2 replies] Last: Solution using custom character table: #include <iostream> #include <s... (by MiiNiPaa)
|
by usr101
How to properly return an array of objects in c++ and use it main?
|
Hi, first time here and I have a question after searching a lot of places including here. In my code I am trying to get a group of Critter objects to move every... |
Nov 2, 2014 at 7:43pm
[2 replies] Last: First, I have limited experience with object oriented design and progr... (by pheininger)
|
by abdalimran
Problem in adding even-valued fibonacci numbers
|
I've written the following program..but it prints a garbage value. Why? #include <iostream> #include <cmath> using namespace std; int main() { ... |
Nov 2, 2014 at 7:38pm
[2 replies] Last: The calculated sum is out of range for int and unsigned int in just ab... (by Cody0023)
|
C points forming a rectangle |
I have this piece of code for finding out whether 4 x,y coordinates make a rectangle which works perfectly well, but, I need to make it so that it only works if... |
Nov 2, 2014 at 7:24pm
[1 reply] : It sounds like you're defining "correct" order as counter-clockwise st... (by dhayden)
|
by blessytg
Program to evaluate sin(x) using Taylor series expansion
|
I run the below given program for finding sin(x) using taylor's sries expansion. but for large values of x and for large number of terms, the result shows incor... |
Nov 2, 2014 at 7:08pm
[3 replies] Last: The problem is that floating point numbers aren't exact. Using more di... (by dhayden)
|
by blairtch
Struggling with Day of the Year Program
|
My assignment is to "write a class named DayOfYear that takes an integer representing a day of the year and translates it to a string consisting of the mont... |
Nov 2, 2014 at 6:57pm
[12 replies] Last: You da man mobotus! Thanks to all for the help, couldn't have done it... (by blairtch)
|
by BeKinect
Problem with reading integers from .txt-file to array
|
I'm working on two programs. The first generates a maze and saves the maze in a .txt-file. The maze in the .txt-file looks like this: 11111111111111111 199999... |
Nov 2, 2014 at 6:33pm
[2 replies] Last: @ Aceix: Thanks for your tip. But how can I implement the seekg() func... (by BeKinect)
|
Machine Code? |
I read that compilers convert the high level language source code into machine code written in 1s and 0s. I want to know how a whats the machine code equival... |
Nov 2, 2014 at 5:37pm
[5 replies] Last: The following program: #include <iostream> int main(void) { std::co... (by pheininger)
|
by Akula
expected Unqualified id error
|
not 100% sure what's going wrong or why it's stating the "expected unqaulfied id before 'int' the error is on line 20 //Program by Garrett Mathew Demers... |
Nov 2, 2014 at 5:13pm
[9 replies] Last: The issues i was having with this segment of the program have been wor... (by Akula)
|
by abdalimran
Confusion while using pointer & string
|
How the following statements actually working? #include <iostream> using namespace std; int main() { char *p="i am a string"; //What is it? ... |
Nov 2, 2014 at 5:08pm
[4 replies] Last: char *p = "i am a string"; "i am a string" is an array of 14 char ... (by Peter87)
|
not understanding errors |
Write your question here. Many of my errors were in the main program saying that "expected '(' before ';' token" #include <iostream> #include <cmath> ... |
Nov 2, 2014 at 4:16pm
[4 replies] Last: Please do not remove your posts after getting an answer. Original post... (by MiiNiPaa)
|
by WilliamLycan
Help in char array
|
Why the length of array y isn't 27? #include <iostream> #include "util.h" // display() #include "str.h" // strFill(), strLength using namespace std; void l... |
Nov 2, 2014 at 3:53pm
[5 replies] Last: Yes, maybe YokoTsuno is right, so I've changed my code to this and now... (by WilliamLycan)
|
by Funkist
Modifing a class instance from the class itself.
|
How can i modify a specific instance of a class using a function in the class itself? What i mean: class CLASS { private: int i; ... |
Nov 2, 2014 at 1:34pm
[2 replies] Last: Thank you so much! I tried something like that but i used CLASS* a ins... (by Funkist)
|
by changkaizhao
what will happen to pointer after set to NULL
|
class A{ private: int i; public: A(){this->i = 2;} void hello(){printf("hello is %d",i);} void helloworld(){printf("hello world");} } i... |
Nov 2, 2014 at 9:32am
[6 replies] Last: functions are not in heap or something. They are functions. Part of th... (by MiiNiPaa)
|
string::erase() |
Hi guys! Sorry for my Englisg Faced with such a problem: given a string. It is necessary to put of all the words from a string in the vector, but it does'nt wor... |
Nov 2, 2014 at 9:29am
[4 replies] Last: Thanks a lot for your answers! Problem is fixed andy1992, interesting ... (by igoreshka3333)
|
by jdmic
Playing with templates
|
Hi, Is there a way to limit a template to a supported type list ? Look at this example below. I have 4 functions that look similar but only 4 data types sho... |
Nov 2, 2014 at 8:19am
[5 replies] Last: Thank you guys !!! I need to look at <type_traits>. Usefull stuff in... (by jdmic)
|
Program for outputting an int in english |
I'm supposed to write a program that takes in an integer and outputs the numbers in english. IE: 932 would output nine three two. The way I tried to write the ... |
Nov 2, 2014 at 7:53am
[2 replies] Last: agh thanks (by Cheetofingers)
|
Do you think this program will find the multiples of 3 and 5 in 1000? |
I just want to make sure this program does exactly as it was intended to do. I'm trying to find all the multiples of 3 and 5 from 1000 and add those numbers to ... |
Nov 2, 2014 at 7:35am
[1 reply] : looks good, though line 16 and 17 are a waste. (by Esslercuffi)
|