447 Posted Topics
Re: Well, postal is a character array, as is address, so you can't use the == operator to do comparisons. strcmp should do it though. I assume you don't realise that you can pass a structure directly into a function as a parameter.[code]struct thing{ int x, y; }; void thingy( thing … | |
Re: Well, first #include <fstream>. Make a type called std::ifstream. This is a stream which can read from files. You should have an array declared so loop through its elements and insert what you read from the file into the successive elements of the array... There's an example here somewhere [url]http://www.cplusplus.com/reference/iostream/istream/operator%3E%3E.html[/url] | |
Re: That's not a drinking issue, it's a drink-management issue. In my opinion if you're stupid enough to drink enough to make you do those things then you deserve them. | |
Re: >> Many of the weapons we are buying don't have an enemy yet. I like that, Lardmeister. >> We don't have a manditory military service any more How/why did that come about, actually? I thought it was still there. Politics and HR activists believing everyone has a choice? | |
Re: I like this game. Got it to two. There are a number of bug in the game, though. | |
Re: Still though... didn't he give away a lot of his money? Or make some charity or something? The margin's not that big. Still though. He was there for a while. I wonder if he'll jump back. >> He is up $2 billion from a year ago and would have been … | |
Re: I saw it first on CSI! Though I predicted that one, oddly enough. Not the means, but the result. | |
Re: People who leave doors open when they creak... also people who eat noisly for some reason. | |
Re: I saw this the other day. [url]http://news.bbc.co.uk/2/hi/science/nature/7241909.stm[/url] | |
Re: Short of physically moving them... you could probably get your desired response by playing with getch() from <conio.h> ... not standard header though. | |
Re: >> I love analysing dreams. Analyse this: I was (in my dream), in a pub that I go to every now and then. I was chatting to some friends and out of the corner of my eye I spot an elevator I didn't notice before. I tried to point it … | |
Re: I'm the most purist of all tea consumers. More than any others. | |
Re: [QUOTE]#include <iostream.h> #include <stdlib.h> // For Randomization #include <time.h> // For Randomization #include "msoftcon.cpp" // External Application void main()[/QUOTE]<iostream.h>, <stdlib.h> and <time.h> should not be used. Use instead <iostream>, <cstdlib>, and <ctime> In terms of <iostream.h> ... it's old. <iostream> is new and good. The other two are used in … | |
| |
Re: I haven't really worked on many extravagant projects. Nurtured some pet projects over time... favourite (which doesn't work anymore!), was a program that sent SMS text messages via an online interface. Very convenient, but the website has changed how it works (potentially techniner's work ;)). I haven't put much work … | |
Re: >> I vaguely heard something about it this morning but it didn't sink in. Just like those people who "just knew" there was something funny about the man next door who happened to be a serial killer? Heh. I felt nothing. Probably too far away. What was it? 5.6? | |
Re: twomers is like a normal lightbulb, but it's actually just a solid block of plastic. LED part 2? Sweet. | |
Re: [code]#include <my_dll.h> #pragma comment( lib, "my_dll.lib" ) int main() { my_dll_function(); return 0; }[/code]Should work with your IDE. | |
Re: >> I really hope you're right, because I'm going to quit in a few months after 8 years of smoking. Smoking will be banned from the bars/disco's/restaurants etc in July here in the Netherlands. Another thing that came from Ireland! I think it was introduced here ... 4 or 5 … | |
Re: twomers is a play on my surname (or second name if that's what ye say). >> would love to your story! Me too. | |
Re: In how close pool is to snooker, I think. Rules here -- [url]http://en.wikipedia.org/wiki/American_football_rules[/url] Long read | |
Re: You should really stop starting your threads with "Good day, boys and girls". | |
Re: I dunno. I'm normally all for sweeping generalisations, Fast, but ... everyone's against them. I feel sorry for them. (still voted for them on this pole though). | |
![]() | Re: >> It's not a big deal for me. But surely if it wasn't a big deal for you, Joe, would you even do anything? Yet, I say this when I envision you being near the north of Canada in an igloo of some description... so you'd probably ski to work, … |
Re: What compiler? Have you included email.h in your project? | |
Re: Simply put leet-speek :) I generally use something I can remember and bastardise and leet it up... Upper and lower characters, numbers, symbols, punctuation. I generally have a minimum of 10 characters too. | |
Re: So what you do is find a [I]really[/I] hot girl and ask her out every Tuesday until she says yes. We'll call her Cameron ... | |
Re: Not decided. I've never watched it so maybe I should... on the other hand I don't know what time it's going to be on Irish time. | |
Re: 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. … | |
Re: You may be ginger, but at least I'm not stupid enough to post in a thread which insults me as the replier. ... | |
Re: Basically all you have to do is set a counter. I assume you're reading the contents of your file in a loop, right? Before the loop do something like: [code]int counter = 10; while ( FILE_READ_CONDITIONS && counter>0) { // etc counter--; }[/code] Or you could put a counter-- in … | |
Re: The problem is (not really a problem), that the program is running too fast and doesn't have anything to stop it from closing. There are a number of options to solve this, most of them are mentioned here -- [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1043803465&id=1043284385[/url] so if you're using C++ throw a [inlinecode]cin.ignore();[/inlinecode] and [inlinecode]cin.get();[/inlinecode] … | |
Re: Or in C++, why bother with what one may call 'messy' character arrays, when there is a 'nice' string type at our disposal. Look at the .substr() method of strings. I recommend looking at the first word of the sentence, finding the next instance of that letter, checking for equality … | |
Re: Well, if you use vec.size() surely the vector is empty when you're trying to null everything... right? Also, doesn't transform take four parameters? Anyway, something like this should work:[code=cpp]#include <iostream> #include <vector> #include <algorithm> #include <boost/shared_ptr.hpp> #include <boost/bind.hpp> template <class ty> class nullify { private: public: ty operator ( ) … | |
Re: It depends on what help you seek. Search for a likely forum here -- [url]www.daniweb.com/forums[/url] | |
Re: Heh. Gotta agree with ya there! Great come back. I'd lost faith in Wales after the first half only to come back into the room to see them score their winning try! | |
Re: We can't help without seeing the offending code. | |
Re: Was that barrel plastic? Either way: [Napoleon Dynamite]Idiot![/Napoleon Dynamite] | |
Re: >> Seems that young people today just don't know how to party, party, and party some more. You're just trying to wind us up, I take it! Happy new year, y'all. >> tomorrow is my N+ Exam. As in the second or first? Either way ... nasty. | |
Re: Well, as nice as [inlinecode]command != ('A' || 'B')[/inlinecode] looks it doesn't work like that. [inlinecode]if( command != 'A' || command != 'B' )[/inlinecode] is what you're looking for, but to be honest a straight out else should do -- it's proven to neither be an 'A' or 'B'. Not … | |
Re: Ew! A few things. * <iostream.h> and <fstream.h> are old and now in the form of <iostream> and <fstream>. You might want to using namespace std; if you're going to change them. * main returns int, so int main(). * Why are you using C File IO when this is … | |
Re: As in [I]sales[20][/I] and [I]p[20][/I]? It's just the size of the respective arrays. They can hold twenty elements. p is uninitialised but sales is by virtue of ={numbers];. | |
Re: >> Can anyone tell, how can i write that program in C++ Write some C++ code that does the job. A small starter point:[code=cpp]class shape{ protected: public: }; class triangle : public shape { private: public: }; class square: public shape { private: public: }; class circle: public shape { … | |
Re: I'd buy the snakes out of stocks I know would do me good. | |
Re: I went through a solid week or two of having the introduction music from [URL="http://en.wikipedia.org/wiki/Dogtanion"]Dogtanion[/URL] in my head... it drove me nuts. [url]http://www.youtube.com/watch?v=CpjQoxMpc0E[/url] | |
Re: 229 ... ? I think ... seems very condensed here... I could be clostophobic if I was a prime number around that number! |
The End.