|
|
Random Thoughts.....What are you thinking?
By Jetackuu 2012-04-28 19:43:55
lol, messed up.
Bismarck.Dreadnot
Server: Bismarck
Game: FFXI
Posts: 5113
By Bismarck.Dreadnot 2012-04-28 20:08:07
My room feels like an oven. been playing TERA for 4 hours. alt tab to check my monitoring program.. video card running at 97ºc . . . . . pop open case and put a fan on it.
Temp drops to 80ºc
Continues playing TERA.
Alexander.Drokin
Server: Alexander
Game: FFXI
Posts: 2740
By Alexander.Drokin 2012-04-28 20:14:35
0:22 through 0:36
Also, bored. :|
Server: Valefor
Game: FFXI
Posts: 14155
By Valefor.Slipispsycho 2012-04-28 20:22:04
I never changed a diaper until my son was born. It's like second nature. I still wouldn't know what to do if someone handed me a baby girl though. >_> lol i wont know what to do with a boy diaper :x Take the dirty diaper off and then DUCK until you get the clean one. D:
Close!
Take the dirty diaper off and prepare to use your hands as a shield for the poor kid in case he tries to spray himself in the face, while putting the new diaper on.
I never got pee'd on. My son's mom did, though. :D I'm late, but when my son was really young and getting his diaper changed he started pissing straight up in the air, and it arced and hit him right in the face, then he started screaming and crying while still pissing in his own face.
By Irohuro 2012-04-28 20:32:05
LOL thats horrible
chaos where are you?? ; ;
By Jetackuu 2012-04-28 20:34:27
LOL thats horrible
chaos where are you?? ; ; that's a good question, where is he?
By Irohuro 2012-04-28 20:39:28
i just need help on a program, it's being stupid and i don't understand why
Alexander.Drokin
Server: Alexander
Game: FFXI
Posts: 2740
By Alexander.Drokin 2012-04-28 20:44:28
i just need help on a program, it's being stupid and i don't understand why
Go ahead and post the code. I'm out of practice but I followed the last one you posted alright. If it's just syntax or something basic I might be able to still catch it.
Server: Shiva
Game: FFXI
Posts: 2391
By Shiva.Leonkasai 2012-04-28 20:49:34
Oh god, leaving /vp/, someone started posting Audino abuse pics. T~T What reason is there to even go to /vp/ these days?
All I ever see there anymore is the usual roleplay/image dump threads and maybe the occasional wi-fi general. :/
I miss the early days when /vp/ was full of ROM hacks and people banding together to make awesome games that never got anywhere. :<
By Irohuro 2012-04-28 20:50:13
lol, it's not very basic, it's the advanced problem i had to do for my last chapter.
the chapter is on reading/writing to a text file, and i had to write a program that that gave you the option to enter a town and it's zip code, or search for a town by zip code. the first part i have working fine, it's the stupid search i can't get to work right. (the showCityZip() function)
this is what i have atm: Code
//purpose: to enable a user to add cities and their corresponding zip codes,
//along with being able to search for cities by zip code
//author: me
//date: april 26, 2012
//filename: advanced26.cpp
//input:
//output:
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
//***function prototypes***
void saveCityZip();
void showCityZip();
int main()
{
//declare variables
int menuSelect = 0;
string divider = "--------------------";
do //begin loop
{
//show the menu, and get the user's selection
cout << "Please select an option from the menu:" << endl;
cout << "1) Enter city and ZIP code information." << endl;
cout << "2) Search for a city by ZIP code." << endl;
cout << "3) Exit program." << endl;
cout << "Your Selection: ";
cin >> menuSelect;
cin.ignore(100, '\n');
cout << divider << endl;
//depending on the selection, call the appropriate function
if(menuSelect == 1)
{
saveCityZip();
cout << divider << endl;
}//endif
else
{
if(menuSelect == 2)
{
showCityZip();
cout << divider << endl;
}//endif
}//endelse
}while(menuSelect != 3); //end do...while
return 0;
}//end of main function
//***function definitions***
void saveCityZip()
{
//declare variables
string zipCode = " ";
string cityName = " ";
//create file object, open file
ofstream outCityZip;
outCityZip.open("advanced26.txt", ios::app);
//check if file was opened
if(outCityZip.is_open())
{
//priming read of zipCode
cout << "Enter the ZIP code(-1 to stop): ";
getline(cin, zipCode);
while(zipCode != "-1")
{
//get the city name
cout << "Enter the City Name: ";
getline(cin, cityName);
//write to file
outCityZip << zipCode << '#' << cityName << endl;
//update read of zipCode
cout << "Enter the ZIP code(-1 to stop): ";
getline(cin, zipCode);
}//endwhile
//close the file
outCityZip.close();
}//endif
else
{
cout << "Could not open file." << endl;
}//endelse
}//end of saveCityZip function
void showCityZip()
{
//declare variables
string cityName = " ";
string zipCode = " ";
string fileLines = " ";
string fileInfo = " ";
int zipLocation = 0;
int spaceLocation = 0;
//create in file and open it
ifstream inCityZip;
inCityZip.open("advanced26.txt", ios::in);
//check to see if file was opened
if(inCityZip.is_open())
{
//search for the city by zip
cout << "Enter the ZIP code of the city you wish to search for(-1 to stop): ";
getline(cin, zipCode);
while(zipCode != "-1")
{
//get the info from the txt file and put it in a string
while(!inCityZip.eof())
{
getline(inCityZip, fileLines);
fileLines += " ";
fileInfo += fileLines;
}//endwhile
//find the starting and ending points of the city name, and put the city name in it's variable
zipLocation = fileInfo.find(zipCode, 0);
spaceLocation = fileInfo.find(" ", zipLocation+2);
cityName = fileInfo.substr(zipLocation+2, spaceLocation);
//display the name
cout << "The City with the ZIP code " << zipCode << " is: " << cityName << endl;
//update read of zip code
cout << "Enter the ZIP code of the city you wish to search for( -1 to stop): ";
getline(cin, zipCode);
}//endwhile
//close the file
inCityZip.close();
}//endif
else
{
cout << "File could not be opened." << endl;
}//endelse
}//end of showCityZip Function
Alexander.Drokin
Server: Alexander
Game: FFXI
Posts: 2740
By Alexander.Drokin 2012-04-28 20:55:01
Is it an error while running (not doing what it's supposed to) or during compiling?
I remember doing a program almost just like that for one of my C++ courses, but yours is written a lot different. :o
Anyway, back to looking through it while I wait for an answer to my question.
By Irohuro 2012-04-28 21:03:38
Logic Error,
what it's supposed to do is pull all the info from the file and put it into a string, and then it searches the string for the specific zip code, where it stores it's location in the string, then i searches for the end of the the space at the end (which i need to change to a different character) and stores that location, and then it takes the part of the string thats +2 from the end of the zip code until the space and outputs that, but what it does is it outputs the last 3 digits of the zip code, the city name, and then some of the info behind it
Alexander.Drokin
Server: Alexander
Game: FFXI
Posts: 2740
By Alexander.Drokin 2012-04-28 21:21:02
So, your input file is more than just the name and zip? (Since you mentioned information behind the city name.)
I hate to say it, but I'm a bit thrown off because your code is written so much more neatly than mine. >_>
I'm stuck on this part for some reason:
Code while(!inCityZip.eof())
{
getline(inCityZip, fileLines);
fileLines += " ";
fileInfo += fileLines;
}//endwhile
Because it looks like you're performing a mathematical operation on a string variable. Maybe I'm just forgetting a rule or something though. I don't remember using getline() when doing my searches. :/
Since it's skipping the first two numbers of the zip code, it's almost like it's somehow doing the +2 before it reads the variables.
Eh, I know I've got to be wrong. Back to looking.
EDIT: Mind if I see your input file (quickly, if possible, it's my bedtime ; ; )?
I'm seeing something with your zipLocation+2 that I want to mess with.
My compiler is being annoying and giving me all kinds of errors. I'm headed to bed. If you're still working on it tomorrow, you can send me your files and I'll see if I can help. Let me know if you get it figured out. I'm curious to know what the problem is too.
Fenrir.Uzugami
Server: Fenrir
Game: FFXI
By Fenrir.Uzugami 2012-04-28 21:45:22
By the power of Grey skull Mundo! I'm bored.
By Irohuro 2012-04-28 22:04:14
aww, sorry i got distracted by something =(
that was the way i found to get the entire text file into the string, what it does is,
fileLines is a temp string variable that holds each line of the text file, the getline gets a line from the text file and stores it in fileLines, then i add a space to the end, and then fileInfo is the main string that holds the entire text file, so it adds one line of text at a time to the main string.
Server: Ramuh
Game: FFXI
Posts: 11972
By Ramuh.Laffter 2012-04-28 22:26:09
Oh god, leaving /vp/, someone started posting Audino abuse pics. T~T What reason is there to even go to /vp/ these days?
All I ever see there anymore is the usual roleplay/image dump threads and maybe the occasional wi-fi general. :/
I miss the early days when /vp/ was full of ROM hacks and people banding together to make awesome games that never got anywhere. :< I was only poking in out of interest cuz /gif/ is full of porn. :S
Some of the discussions in /vp/ aren't bad though.
In other news, playing through a hack of LeafGreen. Caught this. :D
[+]
Server: Asura
Game: FFXI
Posts: 19930
By Asura.Chuuuuu 2012-04-28 22:40:33
thats a weird looking pikachu o.o
Server: Ramuh
Game: FFXI
Posts: 11972
By Ramuh.Laffter 2012-04-28 22:42:00
The hack is called Moemon - LeafGreen :P
It's pretty cute, I only just started <_<
Server: Asura
Game: FFXI
Posts: 2956
By Asura.Lolserj 2012-04-28 22:43:07
i have 4 lines of code to do tomorrow ; ;
By Jetackuu 2012-04-28 22:45:26
Moe creeps me out
Server: Asura
Game: FFXI
Posts: 19930
By Asura.Chuuuuu 2012-04-28 22:45:36
The hack is called Moemon - LeafGreen :P
It's pretty cute, I only just started <_< should play digimon D:<
Server: Ramuh
Game: FFXI
Posts: 11972
By Ramuh.Laffter 2012-04-28 22:48:03
The hack is called Moemon - LeafGreen :P
It's pretty cute, I only just started <_< should play digimon D:< No wanna!
Maybe later, nostalgia-ing.
I do find it odd that I'm essentially making little girls in costumes battle. <__< But they're cute enough for me to ignore that tiny flawed aspect. :D
By Irohuro 2012-04-28 22:50:22
so i was looking at one of those stupid facebook pages, and there was one post that was a picture of MJ and justin bieber doing the same pose, and it said "like if you like Michael Jackson, comment of you like justin bieber"
not a single comment was on that post.
[+]
Server: Asura
Game: FFXI
Posts: 19930
By Asura.Chuuuuu 2012-04-28 22:54:32
The hack is called Moemon - LeafGreen :P
It's pretty cute, I only just started <_< should play digimon D:< No wanna!
Maybe later, nostalgia-ing.
I do find it odd that I'm essentially making little girls in costumes battle. <__< But they're cute enough for me to ignore that tiny flawed aspect. :D only 1 other person in the guild besides me D:<
Bismarck.Magnuss
Server: Bismarck
Game: FFXI
Posts: 28615
By Bismarck.Magnuss 2012-04-28 22:57:21
This is so dumb, but the only memory I have of Digimon was a commercial they used to have in the summer one year when I was like a Sophomore in High School. The commercial's jingle went: "Beat the heat with the Digibeat! All summer!"
The reason I remember that was because every time that commercial came on, I would sing along but change the lyrics to, "Beat your meat with the Digibeat! All summer!"
[+]
Server: Valefor
Game: FFXI
Posts: 14155
By Valefor.Slipispsycho 2012-04-28 22:59:03
So that would make this a digimon then?
[+]
Server: Ramuh
Game: FFXI
Posts: 11972
By Ramuh.Laffter 2012-04-28 23:00:29
That would make it a Digibeat. D:
[+]
Bismarck.Magnuss
Server: Bismarck
Game: FFXI
Posts: 28615
By Bismarck.Magnuss 2012-04-28 23:01:26
I actually have a response to that. It's:
Owwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww...
[+]
Server: Valefor
Game: FFXI
Posts: 14155
By Valefor.Slipispsycho 2012-04-28 23:01:58
Oh, I thought they just changed mon to beat to rhyme
Server: Valefor
Game: FFXI
Posts: 14155
By Valefor.Slipispsycho 2012-04-28 23:03:34
I actually have a response to that. It's:
Owwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww... =/ I've accidentally hit my hand a couple of times on accident with one of those.. Not even hard or anything.. Hurt like hell still..
This is a thread that I found on another website I post at. It can be really really interesting. I thought it deserved a place here.
Post your random thoughts for the day here, or anything else that intrigues you.
For starters, is it possible to give constructive critism to someone who doesn't have a neck? I totally just walked by a girl who didn't. Someone isn't getting a necklace for Valentines day!
And who decided black and white can't be colors? I want to say a racist. I really do.
Inb4thisthreadgetsreallywtf
|
|