Login or register


Last status update:
Personal Info
Date Signed Up:4/14/2012
Last Login:5/26/2016
FunnyJunk Career Stats
Comment Ranking:#218
Highest Content Rank:#620
Highest Comment Rank:#70
Content Thumbs: 21894 total,  25551 ,  3657
Comment Thumbs: 92390 total,  99671 ,  7281
Content Level Progress: 38.1% (381/1000)
Level 220 Content: Mind Blower → Level 221 Content: Mind Blower
Comment Level Progress: 58% (580/1000)
Level 375 Comments: Immortal → Level 376 Comments: Immortal
Content Views:1135901
Times Content Favorited:1368 times
Total Comments Made:22472
FJ Points:6158
Favorite Tags: is (5) | crashes (4) | my (4) | no (4) | the (4) | You (4) | a (3) | i (3) | lemon (3) | liz (3) | all (2) | Cars (2) | colbert (2) | dead (2) | Dog (2) | here (2) | it (2) | Just (2) | me (2) | movies (2)

  • Views: 21496
    Thumbs Up 958 Thumbs Down 65 Total: +893
    Comments: 61
    Favorites: 15
    Uploaded: 07/07/12
    Sex-bo-bomb Sex-bo-bomb
  • Views: 25709
    Thumbs Up 668 Thumbs Down 17 Total: +651
    Comments: 18
    Favorites: 6
    Uploaded: 02/27/13
    This was on a job application This was on a job application
  • Views: 35862
    Thumbs Up 688 Thumbs Down 44 Total: +644
    Comments: 114
    Favorites: 54
    Uploaded: 02/22/15
    Gravity Falls - Polaris Gravity Falls - Polaris
  • Views: 22471
    Thumbs Up 683 Thumbs Down 48 Total: +635
    Comments: 8
    Favorites: 10
    Uploaded: 01/27/13
    Matt Matt
  • Views: 31879
    Thumbs Up 647 Thumbs Down 27 Total: +620
    Comments: 26
    Favorites: 17
    Uploaded: 09/03/13
    Ghey Ghey
  • Views: 42411
    Thumbs Up 605 Thumbs Down 50 Total: +555
    Comments: 52
    Favorites: 31
    Uploaded: 08/26/13
    Wilfred Wilfred
Leave a comment Refresh Comments (1543)
Anonymous comments allowed.
97 comments displayed.
#1888 - ytrellworld (05/06/2016) [-]
hey, so i'm building a game and want to makre sure my functions are written correctly; would you be able to proofread the last 3? (help, reset, end)


thanks in advance. as you can tell i haven't finished the other functions because i haven't got the time right now, but i will. i have the entire script in a text file waiting to be transfered. it's going to be a great accomplishment when i finish this.
#1889 to #1888 - pokemonstheshiz (05/06/2016) [-]
Looks fine to me. I would name your RESET variable just to reset. It's not enforced, but by convention all uppercase variables are generally constants
#1890 to #1889 - ytrellworld (05/06/2016) [-]
i did not know that. also, i'm getting a "switch quantity not an integer" when compiling
does that mean i can't write switch statements for strings?
#1891 to #1890 - ytrellworld (05/06/2016) [-]
so i'm reading this: www.cplusplus.com/forum/beginner/21906/
would that work?
#1892 to #1891 - ytrellworld (05/06/2016) [-]
i wrote this as a test run to see if it would work as enum type and nope, not available
i think my only option is to use if and else if statements
which is gonna look really really messy
#1851 - ytrellworld (05/01/2016) [-]
Do you want to help me not fail my class? Because it's to the point where the material is just too confusing for me. She's teaching us the stuff, but not how to apply it in problems. Like... I just don't get how to organize the things because I'm a very visual learner and all that text makes my brain go numb.

I'd only need 3 problems done, but they'd be kind large codes so I am totally willing to compensate your work if you want me to. I just can't let these 3 ones go unfinished by sunday midnight because then it won't count. Also, thank you for all your help thus far, I really have appreciated it. I'm probably going to drop out of college after this though because my parents are paying for it and my mom keeps complaining about "wasted money" when I fail a class so...
#1852 to #1851 - pokemonstheshiz (05/01/2016) [-]
I can take a look, not sure if I'll have the time
#1853 to #1852 - ytrellworld (05/01/2016) [-]
Anything helps at this point. just some notes, to make it look like my work please do use spaces everywhere. i know a lot of people don't do that, but it's easier for me to read anyway.

since it's all a bunch of text i put them all into one image: orig13.deviantart.net/a31b/f/2016/121/4/8/helpsavemeplease_by_wolfenthusiast-da0z8mq.png

and here are the provided texts from the files provided:


Jason 10 15 20 25 18 20 26
Samantha 15 18 29 16 26 20 23
Ravi 20 26 18 29 10 12 20
Sheila 17 20 15 26 18 25 12
Ankit 16 8 28 20 11 25 21


Bill Quarter_Back 70 0 8754 0 573
Jackson Receiver 55 87 50 5490 574
Grahm Running_Back 45 30 0 50 2800
McCoy Full_Back 25 10 0 25 3762
Daryl Quarter_Back 50 2 7560 0 450
Santiago Left_Tackle 5 0 0 0 0
Hanks Receiver 35 37 0 3590 876
Johnson Running_Back 25 80 0 100 4000
Miller Receiver 110 250 150 7867 2100
Ruth Quarter_Back 85 0 12901 0 3249

and again if you want i can totally compensate your work. i already feel bad for needing someone else to do this for me...
#1855 to #1853 - pokemonstheshiz (05/01/2016) [-]
I can give you a basic algorithm of how to do these and you try and figure out how to do it. Most of these are pretty simple, it's just about being able to logically plan these out. Did you take a programming logic class yet?
Q1) You could make a struct/class that represents a candidate, and then make an array of those, or make two arrays to hold the names and the number of votes. Loop through 5 iterations and get the user input for each candidate. Loop through wherever you're storing the number of votes in, and add them up to have the total. Then the only thing to do is do the output, which will just involve some basic formatting.
Q2)Create the arrays specified (one to store the runner's names, and a 7x5 int array to store the miles run by each runner for each day). Upon the program start, check to see if the file marathon.txt exists, and can be read. If so, read the numbers and names into your array. If not, initialize all your numbers to 0, and initialize the names. The rest is pretty straightforward reading the data, writing the data, and formatting your output.
Q3)This is pretty much word for word in the question. Make a struct that will hold a player's info, and make an array of those structs. Read from PlayerData.txt and fill your array. Make your menu. The search function iterates through an array and looks for the inputed name. The display option just iterates through the array and lists all the player's and their stats. The update function will be similar to the search function, but upon finding the indicated player it will show a list of options you can change, and then you just get the user's input and change whatever value in the array, then write all the current values to the file.

If you at least do the barebones of these it might be easier to help you tomorrow.
#1874 to #1855 - ytrellworld (05/02/2016) [-]
Can I make a void function for inputing info into a struct? Or will it not work because the struct is inside int main() ?
#1875 to #1874 - pokemonstheshiz (05/02/2016) [-]
you can make it a global struct by defining it outside the main
#1876 to #1875 - ytrellworld (05/02/2016) [-]
okay i'm making things global now.
so, do you know how i would change the text file? it seems like she wants the changed data to be reflected in the text. but i don't know how that works, because you can't ofstream and ifstream the same variablle
#1877 to #1876 - pokemonstheshiz (05/02/2016) [-]
you need to read the text from the file and write it into a temp file, changing the lines that need to be changed. Then write the lines from the temp file into the main file. Then remove the temp file
#1878 to #1877 - ytrellworld (05/02/2016) [-]
hey there's 13 minutes left, would you mind putting that in for me?

i have literally everything else done, except when response is set to q it crashes hard. idk how to fix that

#1879 to #1878 - ytrellworld (05/02/2016) [-]
wait i don't have it set up correctly. i have the user input index, not response.
#1882 to #1879 - pokemonstheshiz (05/02/2016) [-]
Separate your user inputs, don't ask for multiple things on multiple lines
#1880 to #1879 - ytrellworld (05/02/2016) [-]
#1883 to #1880 - pokemonstheshiz (05/02/2016) [-]
while (index>=0)
index = 0;

cout << "\nSelect a player number to view info, or 0 to quit.\n\n";

cin >> index;
index -= 1;
if (index>=0)
#1884 to #1883 - ytrellworld (05/02/2016) [-]
well, it's over now. i got it in right as it turned 12:00, so it even says "(LATE)" on it.
oh well, thanks for helping. i really hope i don't fail this course..
#1885 to #1884 - pokemonstheshiz (05/02/2016) [-]
Good luck man. Do you have a final too?
#1886 to #1885 - ytrellworld (05/02/2016) [-]
yeah but i just did the math and i am guaranteed to fail this class. nothing can bring it up now.
#1887 to #1886 - pokemonstheshiz (05/02/2016) [-]
That's unfortunate, sorry to hear that. You should try to learn programming logic, and maybe try some object oriented programming before you try the class again. It makes it easier to conceptualize and learn to plan, at least it did for me
#1871 to #1855 - ytrellworld (05/02/2016) [-]
[Q2] okay so i wrote the entire code forgetting about the text file. now i gotta rewrite it to include file input grrr
#1872 to #1871 - ytrellworld (05/02/2016) [-]
aaaaaaaaaaaand now setprecision isn't working.
the average with 35 should be 35.43 .
Here's what I have: pastebin.com/nQGJJ6q8
And here's the input file: pastebin.com/4MasU1s7
#1873 to #1872 - ytrellworld (05/02/2016) [-]
nvm figured it out. i need "fixed" before setprecision.
#1854 to #1853 - ytrellworld (05/01/2016) [-]
the main reason i can't do the first problem is i really just don't know what to do with the arrays. it hasn't clicked yet.
#1856 to #1854 - pokemonstheshiz (05/01/2016) [-]
Arrays are used to hold small lists of data.
Imagine you have a list of names. Do you want to have a separate variable that holds each of them?
std::string name_one = "Bill";
std::string name_two = "Tim";
std::string name_three = "Fred";
std::string name_four = "Sue";
std::string name_five = "Sally";
Maybe for a few names, but for 10? 20? 50? No, you'd want some sort of structure that can hold them all, and you can easily look through.
std::string names[5] = {"Billy","Tim","Fred","Sue","Sally& quot;};
#1857 to #1856 - ytrellworld (05/01/2016) [-]
so would i do something like this for the variable initializations:

string name[5];
int votes[5];
int total = votes / 5;
double percent = (votes / total) * 100;
#1858 to #1857 - pokemonstheshiz (05/02/2016) [-]
Almost correct
Your total votes should be the sum of all the votes for each individual candidate.
Also, when calculating your percent, make sure you cast either votes or total to a double, because two integers dividing will give you an integer (5/2 will give you 2)
#1859 to #1858 - ytrellworld (05/02/2016) [-]
so... how would i add the array? do i need to do a loop function with another int variable?
#1860 to #1859 - pokemonstheshiz (05/02/2016) [-]
int total = 0;
for (int i = 0; i<5; i++){
std::cout << total << std::endl;
#1862 to #1860 - ytrellworld (05/02/2016) [-]
How do I input for an array though? I'm getting an error for cin >> name and cin >> votes
#1863 to #1862 - ytrellworld (05/02/2016) [-]
wait scratch that, i can't cast an array as a different number type. i can't do static_cast<double>(votes)
#1864 to #1863 - pokemonstheshiz (05/02/2016) [-]
static cast the total instead
#1865 to #1864 - ytrellworld (05/02/2016) [-]
here's the product; though when you get the results page it for some reason doesn't space things how they should. setw(n) has worked before so why not here?

#1866 to #1865 - pokemonstheshiz (05/02/2016) [-]
I didn't add anything to stop it from breaking if you enter letters when asking for the votes.
Also, I split up the asking of the name and votes, as well as asking for each instead of just one big lump insert. That's really confusing for a user. Formmating is done too
#1867 to #1866 - ytrellworld (05/02/2016) [-]
what the ****... it's acting as if i'm running my version, not yours. i closed the program and reopened it, then loaded the code and tried again but it still acts like mine.
#1868 to #1867 - pokemonstheshiz (05/02/2016) [-]
You have to compile to see the changes.
#1869 to #1868 - ytrellworld (05/02/2016) [-]
i just deleted everything in the folder, in hopes of clearing its memory, and then made a new file and pasted the code back in. worked just fine. so now that one's done.
#1870 to #1869 - pokemonstheshiz (05/02/2016) [-]
When you compile it creates your .exe file, which is what you run, the source code is in the .cpp file.
#1861 to #1860 - ytrellworld (05/02/2016) [-]
i can put that as a void function outside of main, and then call it back during the output screen. it should come last in the display. i think i'm starting to get this maybe.
#1850 - IHaveADHD (04/14/2016) [-]
Faggots fly when you're a time.
#1847 - ytrellworld (04/11/2016) [-]
How would I write a switch for when you have an integer variable but the user inputs something not a number?
#1848 to #1847 - pokemonstheshiz (04/11/2016) [-]
the trick I use is

while (std::cout << "Please input the desired check amount as a number " && !(std::cin >> myInt)) {


If the input does not match the intended type, the while statement will continue to run.

#1849 to #1848 - ytrellworld (04/11/2016) [-]
i got it figured out. my buddy showed me some code and i took out an extraneous variable.

while (program isn't exited)
~code stuffs~

cin >> numcups


cout << "Please enter an integer only." << endl;
#1835 - ytrellworld (04/08/2016) [-]
If I create a namespace, does that mean when i type in "using namespace custom;" i can only use what i have declared within that namespace?
#1846 to #1835 - ytrellworld (04/08/2016) [-]
okay uhhh... the problem i'm working on now is a menu, but the teacher wrote in "reduce the number of mouse clicks"


i don't know if she expects a click-able menu or what she means by that.
#1837 to #1835 - pokemonstheshiz (04/08/2016) [-]
Most people tend not to use namespaces though
#1836 to #1835 - pokemonstheshiz (04/08/2016) [-]
It means you can use what you've defined in that namespace without specifying the library. You also still have to include the files you want from that library

#include <iostream>
using namespace std;

means I can type
cout << "hello world" << endl;
instead of
std::cout << "hello world" << std::endl

Because unless otherwise stated, it's going to assume I mean the std library.
#1838 to #1836 - ytrellworld (04/08/2016) [-]
oh okay.
now, i'm working with enum variables and wanna know if i did this correctly
#1840 to #1838 - pokemonstheshiz (04/08/2016) [-]
If you actually want to demonstrate the enum's use, should be
#1841 to #1840 - ytrellworld (04/08/2016) [-]
really? I'm a tad confused with enum types. I thought if you initialized a variable (here it's "bird") it would be an integer, not a string type.
#1843 to #1841 - pokemonstheshiz (04/08/2016) [-]
birdType:: PEACOCK
with no space
#1845 to #1844 - pokemonstheshiz (04/08/2016) [-]
Should work probably.
the variables in enums basically work as constants
#1842 to #1841 - pokemonstheshiz (04/08/2016) [-]
#1839 to #1838 - ytrellworld (04/08/2016) [-]
here it is as a paste, oops
#1825 - ytrellworld
has deleted their comment [-]
#1834 to #1825 - pokemonstheshiz (03/25/2016) [-]
Assuming the values are space separated. I read and stored them, you have to sort and output them still
#1829 to #1825 - pokemonstheshiz (03/25/2016) [-]
Would you mind if I just rewrote it? I think you're making reading files more complicated than it is. Also, even if it were reading correctly, your sorting logic doesn't really work, it sorts each line compared to each other, but not overall.
I'm going to add everything to a vector, and then sort that vector
#1830 to #1829 - ytrellworld
has deleted their comment [-]
#1831 to #1830 - pokemonstheshiz (03/25/2016) [-]
Can you use arrays? You could rewrite mine to use arrays instead, you'd just have to read the files twice so you can allocated the array size first.
Or you could just read ahead. My profs always told us that we could use concepts not yet covered, but we were responsible for understanding them.
#1832 to #1831 - ytrellworld
has deleted their comment [-]
#1833 to #1832 - ytrellworld
has deleted their comment [-]
#1826 to #1825 - ytrellworld
has deleted their comment [-]
#1827 to #1826 - ytrellworld
has deleted their comment [-]
#1828 to #1827 - ytrellworld
has deleted their comment [-]
#1817 - ytrellworld
has deleted their comment [-]
#1820 to #1817 - ytrellworld
has deleted their comment [-]
#1822 to #1820 - ytrellworld (03/07/2016) [-]
update 2: i figured it all out. sorry for cluttering up your profile >~<
#1823 to #1822 - pokemonstheshiz (03/07/2016) [-]
Np, glad you figured it out. Still working on C++?
#1824 to #1823 - ytrellworld (03/07/2016) [-]
ah, yes. i'm taking a class on it. i don't know what i can apply my skils to just yet, but maybe in the future i'll come up with something. maybe...
#1821 to #1820 - ytrellworld
has deleted their comment [-]
#1819 to #1817 - ytrellworld
has deleted their comment [-]
#1818 to #1817 - ytrellworld
has deleted their comment [-]
#1812 - mariopimpjr ONLINE (02/24/2016) [-]
Kids Crying for No Apparent Reason Compilation
#1813 to #1812 - pokemonstheshiz (02/24/2016) [-]
what are you referring to?
#1814 to #1813 - mariopimpjr ONLINE (02/24/2016) [-]
i just feel bad when babies cry and at the same time its cute because of the reason they are
#1815 to #1814 - pokemonstheshiz (02/24/2016) [-]
but why on my profile?
do I know you?
#1816 to #1815 - mariopimpjr ONLINE (02/24/2016) [-]
to show you
#1804 - ytrellworld (02/15/2016) [-]
so uhhh... how do i generate a random integer number? I'm trying to make a "guess the number" program but I can't figure it out with googling
#1805 to #1804 - pokemonstheshiz (02/15/2016) [-]
you have to import cstdlib (a utilities library from C)
Then literally all you have to do is use rand()
If you want to limit the range, a neat trick is to use a modulus

int num = rand()%15;

Will generate a random integer between 0 and 14 (since modulus just gives you the remainder, it will always be between 0 and your number -1)
#1806 to #1805 - ytrellworld (02/15/2016) [-]
i'm gonna need help re-writing this code, because i can't figure out why the compiler insists that using backslash isn't allowed.
i'm still new to c++ so i'm probably making really obvious mistakes here
#1808 to #1806 - pokemonstheshiz (02/15/2016) [-]
or www.cplusplus.com/forum/beginner/31758/
I don't use linux or g++, I just use visual studios and its compiler, so I'm having to google this stuff
#1807 to #1806 - pokemonstheshiz (02/15/2016) [-]
Essentially your problem is g++ isn't specifying that you're using c++11
try adding a compiler option when you run

g++ -std=c++11 your_file.cpp

You also have some other issues with the actual code, but let's solve that one first
#1809 to #1807 - ytrellworld (02/15/2016) [-]
i'll just scrap it and start over another day
#1811 to #1809 - pokemonstheshiz (02/15/2016) [-]
one thing I forgot to mention about rand the other day is that you should set the seed for a random number if you want it to actually be random every time, otherwise it will assume the seed was 1. Meaning every time you run the program you'll get the same set of values. The trick I use here is to set the seed (using srand() ) to time(null), which is the current system time in seconds (since the 1970). That way you're setting the seed to an ever changing number, giving you different results every time
#1810 to #1809 - pokemonstheshiz (02/15/2016) [-]

Here, I rewrote it to work correctly. Also, visual studios works is also for linux
#1795 - anonymousperson (04/15/2015) [-]
Hey man!
Could you do me a favor?
#1796 to #1795 - pokemonstheshiz (04/15/2015) [-]
#1797 to #1796 - anonymousperson (04/15/2015) [-]
My DM gave me a hint to a character and all I know is that she scares the shut out of my friend. And that she's evil and powerful.
Also, something to do with solo song
Could you reverse image search this?
#1798 to #1797 - pokemonstheshiz (04/15/2015) [-]

Possible supposed to be the wife of Sanguine, daedric prince of debauchery
#1799 to #1798 - anonymousperson (04/15/2015) [-]
You are awesome man
Having no complaints sucks
#1800 to #1799 - pokemonstheshiz (04/15/2015) [-]
np lol
oh, I finished up my fangame kit (it's not a game, it's a kit to help developers bring fangames into the 6th gen)
you should check it out
#1801 to #1800 - anonymousperson (04/15/2015) [-]
:: computer is Pepsi. But of course I would!