Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~23.5K People Reached
Favorite Tags
Member Avatar for mystycs

Is there a way to sort a vector with a class that has an int variable? I want to have my vector sorted and printed in console. I want to be able to sort the vectors. Say i create a bunch of vectors here on user input `vector<PCB> Disks2[DiskDevices];` Basically …

Member Avatar for Schol-R-LEA
0
412
Member Avatar for mystycs

Is there a way to mimic creating multiple queues like this but with priority queue? This is what i have but i want to now use a priority queue. queue<PCB> Disks[DiskDevices]; I tried this but it doesnt work. priority_queue<PCB> DisksTest[DiskDevices]; It wont compile? What am i doing wrong?

Member Avatar for mystycs
0
485
Member Avatar for mystycs

How can i make it so that my input only allows either the char a or b. Basically this is what i have now. cout << "Enter either a or b: "; char ab; cin >> ab; cout << ab; But in the event someone enters something other than a …

Member Avatar for mystycs
0
98
Member Avatar for mystycs

I have a string and i want to conver the part of it to an int. I want to convert the part of the string `input[1]` to an int. But my compiler cant use atoi, or stoi.. I saw a ifstringstream option i think can work, but i tried implementing …

Member Avatar for tinstaafl
0
323
Member Avatar for mystycs

I want to create a queue that holds certain information. I want it to hold multiple peices of information like below. Name, Age, Race, Sex. How can i create a queue FIFO. that holds multiple pieces of information like this that i can access or add into? Thanks!

Member Avatar for David W
0
808
Member Avatar for mystycs

I am trying to print my queue which has values in it. Right now i have this. for(int i = 1; i<ReadyQueue.size(); i++) { } But i am stuck now because i have no idea how to print a queue without popping it off the front. So now i am …

Member Avatar for David W
0
1K
Member Avatar for mystycs

I have a class below class CPU { public: void setPID (int a) { PID = a; } int retrievePID() { return PID; } private: int PID; }; And i am curious if you can create a queue into this class? I am trying to queue in a value into …

Member Avatar for David W
0
341
Member Avatar for mystycs

How can i write it so that my program only accepts positive integers that are great than or = 0? I want my program to ask "How many devices do you wish to add?" And if a user enters a letter, or anything negative it will ask them to enter …

Member Avatar for David W
0
19K
Member Avatar for mystycs

I am getting an error on this code. Is it to do with whats in the while loop? How do i get it working? Basically i want to be able to take in letter or number variables, and each would output something, and if they type exit it breaks out …

Member Avatar for David W
0
500
Member Avatar for mystycs

How can i create a input that only allows the letters a b c d The console will ask to please enter a letter. And they can only enter the letters a b c d. And if they enter it, it says thank you for enter a, or b or …

Member Avatar for David W
0
302
Member Avatar for mystycs

Below i made a MySQL Table in my phpmyadmin. [Click Here for a screenshot of my phpmyadmin table](http://i.stack.imgur.com/7gl77.jpg) I want to print on my php page the cat_name of a cat_id of my choosing. What code would i use exactly for that? I am looking at this guide here But …

Member Avatar for diafol
0
190
Member Avatar for mystycs

If statement acting weird. For some reason if in the IF statement `if ( choosePositionX )` goes to else which tells the user the other player already made the move it goes into the next if `if ( choosePositionO )` and prints out the else in that one. How can …

Member Avatar for mystycs
0
119