Now that I think about it I'd probably hide in the corner and wait for an adult.
John A commented: Maybe he is a dude. Never trust your instincts. ;-) +13
Now that I think about it I'd probably hide in the corner and wait for an adult.
Obviously not comprehensive (cause of unheard-coverups), but here's a longish list (I like lists):
http://en.wikipedia.org/wiki/List_of_UFO_sightings
You're one's mentioned at the end, Josh:
Dozens of residents of Stephenville claim to have seen a "large silent object with bright lights flying low and fast." Several also reported having observed fighter jets chasing it.
I went through a solid week or two of having the introduction music from Dogtanion in my head... it drove me nuts. http://www.youtube.com/watch?v=CpjQoxMpc0E
>> I know a lot of old folks that act rather childish. I almost consider that a normal behaviour.
When my parents (my dad in particular), became grandparents they act the same age as the kids themselves when they're over. It's actually quite amusing. But annoying if you're trying to hold a serious conversation with a three yea... your father.
Cake. First thing I've eaten since lunchtime on Monday. That's about 100 hours.
Drinking sprite too. Touché, Christina.
Wrap your code in code tags [code]
[/code], but put in a language specifier, like so: [code=c]CODE GOES HERE [/code] or [code=cpp]CODE GOES HERE [/code]. The latter gives:
CODE GOES HERE
I came across this - http://curl.haxx.se/mail/lib-2004-10/0032.html which suggests that some email servers can work with libcurl. But those that do work because of happy chance rather than plan.
If you have a mailing sending service that you can trigger using one of the
protocols libcurl supports, then yes. libcurl has no SMTP or similar support.
I don't know.
I haven't done it.
I was suggesting methods that should work. Effort will need to be expended. As we say: Show some work and we'll help.
>> Please can you explain how to compile it to a dll.
I've no idea. Try here. I was just thinking on my keyboard.
>> I was under the impression you can only use a python script if the OS has the python files installed.
Well, python's a scripting language, right? One that uses an interpreter to perform some function. In that respect it's similar to Perl, which I have used, and I have heard of (not used), some programs which will convert the script to a stand alone executable. So I assume scripts could be converted to dlls too. Then my mind suggested that this might be feasible with Python too.
The source isn't too hard to compile. And it brings advantages with it too rather than using the exe straight.
Edit: This seems encouraging: http://www.velocityreviews.com/forums/t343251-making-a-dll-with-python.html
>> Can you show me an example.
Now what would you do if a newb asked this, huh? However, here is a link with a number of sample programs -- http://curl.haxx.se/libcurl/c/example.html Not sure if what you want is exactly there. It's fairly straightforward to use, libcurl. Playing around with it should suffice.
As for python, I have no idea. You could possibly compile it to a dll and link from that...
Also, if you do decide on using libcurl you're going to have to build it with openssl and zib so it will have https access, as far as I remember.
Or if you don't want the whole screen to clear, only the line with the number on it:
for ( int i=0; i<100; i++ ) {
std::cout<< "\r" << i << "\t";
Sleep( 100 );
}
\r goes to the start of the line, assuming you're printing to the start of the line, that is. The tab is just to assure that everything is cleared.
>> I think the election is already over. Unless all hell breaks out this year, we will have a President Clinton again in the WH.
That may be true but she's not winning this one. Will Bill be the first lady?
Also, it would be cool if we could eliminate the candidates as time progresses from this poll. To see how conforming the forums are to real people.
The simplest thing I can think of is to use some kind of pop3 library... I'm sure there are probably some available. ( first hit -- http://www.marshallsoft.com/see_4c.htm No idea on how good it is )
If not I reckon you should be able to do something with libcurl ... I'm guessing here ( http://curl.haxx.se )
Also, a buddy of mine made a VB script before to spam people that annoyed him. It sent emails from his gmail account. I know VB probably isn't your ideal solution, but it's an option if all else fails.
Failing all this you could write a library yourself :) Like sockets?
What OS? XP?
Edit: First one is not free, alas. Search around and I'm sure you'll find something.
I'm glad you put in the last line in the thread.
But I, for one, would like to see some work before helping. Just to see where you are so the advice I'm giving isn't redundant.
It's basically minced meat, potato and cheese. But you can really put anything in it. It's delicious, alright. It's like omelettes in that no matter how much you put into it it always tastes really good. I think it's the same as cottage pie, but maybe there are small differences.
http://en.wikibooks.org/wiki/Cookbook:Shepherd%27s_Pie
Real easy, and real tasty.
Shepard's Pie. Too much shepard's pie.
>> gets(p->name);
Bad. Seeing as you're using C++ (noticable only from the *& in insert
), you can use std::getline
and std::string
s. Also in C++ one does not need to typedef
struct
s.
>> main() main
returns in int: int main()
.
Also, good idea not to allow the users to quit.
>> scanf("%c%c%c%c",&a,&s,&d,&f);
>> if ((a=='a')&&(s=='r')&&(d=='c'))
>> else if ((a=='l')&&(s=='i')&&(d=='n')&&(f=='e'))
I'm guessing you don't know about using character arrays then? Take a look here. Ones to note are strcmp() and look into scanf-fing with %s
.
>> system();
What's that there for?
>> for(yf==yl1;yf<=yl2;yf++)
The first parameter in a for loop is meant to be assignment, not comparison, like here:
>> for(xf=1;xf<xl1;xf++)
I find it very difficult to read your code. Fair enough it's indented and such... but it's a little all over the shop...
Easiest thing to do, from experience, is to download VLC Media Player and read up about its networking functionality.
With the architecture you provided you don't need any set member function. You can access the variables by using .
class Name
{
private:
int id;
string lastName;
string firstName;
string phone;
double amt;
public:
void output();
void set(int, string, string, string, double);
};
I believe is what you were meaning?
Anyway, that wasn't your question.
>> name[0].set(123, aLastName, aFirstName, 617-538-2888, 1000.00);
This is where your problem is. aLastName, aFirstName, and the first number aren't strings. They 'look like' variable-names to your compiler, but, of course, they haven't been declared... so it says they don't exist. You could do: name[0].set(123, "aLastName", "aFirstName", "617-538-2888", 1000.00);
, or declare and set variables by the name of the parameters before calling the set member if you want and that should work.
People who disagree with me! Clearly I'm always right.
>> I was raped by my boss. -_-
Bet if you tried hard enough you could get him for sexual assault or something.
I'm kind of ambidextrous. I've been taking notes in class with my left hand for the last... 4 months. I'm not certain why, but I am certain that when it comes to exam time I'll curse the day I decided that was a good idea.
Last night I had a dream that I was in Africa and my lecturers in university were all terrorists and they were trying to find me for some reason. I was hiding in a tree with five other members of this imaginative resistance and one of the lecturers saw me, so I jumped down and knocked him out so he couldn't give away our position (I knew, somehow, that he'd wake up with amnesia), sacrificing myself for my four colleagues. When I landed I was in my room at home and so was everyone else (the tree included). To teach me a lesson one of the lecturers was going to nail my hands to my bed (or tie them to the bed, can't remember). Anyway, they got distracted by a noise in the kitchen and I jumped out the window (bungalow), climbed down the chimney (Santa-style), and somehow got into the part of the house above the indoor-ceiling but below the actual roof. I fell into my garage then and woke up (before I hit the ground, can't find the Far Side pic I'm afraid).
I had a similar dream before about secondary school but it was a full-out assault on the building. The entire student body was armed, protected to their necks and were attacking (like the beach in Private Ryan), the school. I eventually got caught and was told to go home and think about what I had done.
I agree with uniquestar. B&J is good. Expensive. I was working in a shop before and it kept on going off (nobody was buying it), and I was told to throw out the gone off stuff... so I threw it into my buddy's boot. Had enough for about a month. Note to the wise -- B&J keeps well.
Lots of wand-words there.
Hermione: Now if you two don't mind, I'm going to bed before either of you can come up with another clever idea to get us all killed - or worse, expelled.
Ron: She needs to sort out her priorities!
I really don't know what you mean. Do you want to save integers to file? Binder?
Does playing online flash games count? I found a neat 'golf' kind of one with planets and gravity.
Ever wonder why there aren't any babies in the north during the winter, vegaseat?
My experience was much like what you'd expect Atticus Finch to say. And I was more confused after asking. I asked, as far as I remember, cause there was a big rape case on the news all the time and I liked watching the news as a kid.
So. Clinton got the winnings in her primary battle ... Anyone see this coming? She puts it to her tears... or near tears, I hear.
Also, what's the difference between caucus' and primaries? Nobody over here seems to know (least not anyone I've asked). The gist is that a caucus is where a party decides on people and primaries are when the people decide who to put forth?
>> My boss saw it and he was like..."that was naasstyy..."
What does your boss boss in?
Who doesn't like a good quote from time to time? Anyone got any good ones? I like this one from Contact:
First rule in government spending: why build one when you can have two at twice the price?
Man, that movie's over ten years old now... weird.
Nor was I, m'boy. Nor was I. Nor was I planned then - I was a "pleasant surprise".
Hypocrites. (Wrote hippogriffs first, whoops).
#include <cstdlib>
int main( void ) {
system( "dir>output.txt" );
return 0;
}
Found a floppy with Battle Chess on it the other day. After searching for a drive for it I copied it to my computer and it works. I've been playing nothing but that.
I may be misinterpreting the original hypothetical scenario, but I'm seeing at least one problem with some responses.
To all of you who claim you'd become millionaires from investing in stocks that -will- do well, I'd like to ask you something. Where are you going to get the money to do so? Unless you were around at the time in the first place, then your credit cards won't have been issued, your checking and/or savings accounts won't be around, and you'll probably be busted for counterfitting when you try to pass 1983+ cash.
I'm always prepared.
Loan shark. How're they going to get it back, huh?
Also the question about knowing whether or not you would go back comes up. If I found myself in back 1982 (which is 26 years ago), I'd probably freak out a little bit if I didn't know that I'd go back (forward), and do nothing worth note.
I would invent, or rather fund the invention of, lake bass. They probably exist already so I'd promote their numbers. I'm sick of people eating "Sea Bass".
Do you know how to write one for a terminated list? It's not all that bad. At the root just set the 'previous' to NULL, and set previous->next to NULL and go through it until you reach NULL.
Alternatively you could use auto_ptrs or something.
I always thought you were a dude, Ene Uran!?
Never trust your instincts.
I'd buy the snakes out of stocks I know would do me good.
Hehe.
My buddy once started talking like he was the 'home owner' and had the person on the phone for half an hour. Sounding like a very encouraged and likely customer. Then the telemarketer asked if he would like to subscribe and he said "Well I'm not the bill payer, am I?".
This was asked in another forum I go to and I came up with the following:
Reading contents of a file directly to a vector
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
int main( void ) {
std::ifstream in( "shorts.txt", std::ios::binary );
if ( in ) {
std::vector< short > vs;
vs.insert( vs.begin(), std::istream_iterator<short>(in), std::istream_iterator<short>() );
std::copy( vs.begin(), vs.end(), std::ostream_iterator<short>(std::cout, "\n"));
}
return 0;
}
It's along the same lines as Naure's 'printing vector contents without a loop' trick. Use with caution though. Especially if you have a mix of types:
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
int main( void ) {
std::ifstream in( "shorts.txt", std::ios::binary );
if ( in ) {
std::vector<short> vshort;
std::vector<std::string> vstr;
// Read shorts until fail
vshort.insert( vshort.end(), std::istream_iterator<short>(in), std::istream_iterator<short>() );
// Clear stream
in.clear();
// Read strings until fail, inadvertently reads to end of file.
vstr.insert( vstr.end(), std::istream_iterator<std::string>(in), std::istream_iterator<std::string>() );
std::copy( vshort.begin(), vshort.end(), std::ostream_iterator<short>(std::cout, "\n") );
std::copy( vstr.begin(), vstr.end(), std::ostream_iterator<std::string>(std::cout, "\n") );
}
return 0;
}
Will store numbers in the vector of strings until it fails. Then after clearing the stream it'll read in the rest of the contents until finished. But of course this is the case in all file IO.
I find it infinitely annoying... and I can't get it out of my head... It's like a very well designed advert. I heard that they are meant to annoy you... I probably wouldn't hire that guy from that CV. I just couldn't take him seriously, you know.