@Ace I was talking about the vector.h header in the stone-age TurboC, not std::vector ^^, plus I dont think any "graphic concept" will be applicable to OP's question (since hes on the dos/prompt) ..
Type: Posts; User: R41D3N
@Ace I was talking about the vector.h header in the stone-age TurboC, not std::vector ^^, plus I dont think any "graphic concept" will be applicable to OP's question (since hes on the dos/prompt) ..
dont use system() . If you want to hold the display screen, better use cin.get();
the way I suggested it, you wouldnt need an if-else block. Rather than user choosing which 2 to keep as is, let...
just tell the user to enter the element he wants to switch with the average ... lets say x(0/1/2)
then your lhs would become
a[x] = ....
You could work vectors the same way, if thats...
I guess he means something like:
#include <iostream>
#include <vector>
And nop that wouldnt be necessary, since its just 3(size fixed) values. You might as well use an array of size 3.
Seems to be true ....
@Neo1: I think they have a vector.h in TC ... plus there arent any frames in the dos afaik O.o ...
ROFLMFAO :devil: whats this, Blast from the Past?
^again :D ...
Refer for Asteroids
TIP: Drop TC, it wont get you anywhere. If you are interested in graphics using C++, try working with...
It is as laserlight pointed out. The 2 dont really work in the same way.
Method 1:
for(int iii = 0; iii < 5; ++iii)
{
cout<<"A";
cout<<"B";
cout<<"C";
@whiteflags: thought so :D ... back to some brain storming :o
couldnt it be done somewhat like this:
copy(X1.begin(), X1.end(), inserter(X3, X3.begin()));
copy(X2.begin(), X2.end(), inserter(X3, X3.end()));
I was just wondering why std::copy() returns an OutputIterator.
template<class InputIterator, class OutputIterator>
OutputIterator copy ( InputIterator first, InputIterator last,...
returnSomeString() still is temporary and hence even if you append it or you dont(w/o const RT), hardly makes any difference in the code. Right?
Try this:
const return type
You dont like it? I loved it :D ... And even where you absorb the zombies for health :devil: .. What can I say, I am ebil!
@iMalc: Off those 2 I'd prefer PvZ :D ... L4D 2 is a bit gory~ish for me. Though Prototype 2 aint that bad even with some gore in it :)
So end result of the topic is "the Standard Template Library...
Sorry, turns out it was the compiler in that site. Tried the same code with MinGW and it returns garbage :P.
@Dontgiveup: Your best bet then is fill() :)
bool
int
float
double
Seems like all have been initialized by default. :tongue:
Just compiled it, its not undefined. All elements are initialized to false by default.
Code
Cant you just use:
fill(test, test+100, false);
yup it gets set to null, a simple change from false to true shows the problem :D
why not just create your own list then, would be so much easier than the size constraint in case of arrays ...
Oh, my bad :) ...
Just to clarify, he meant the Standard Template Library (STL) part of C++, wherein you dont have to "new-delete" stuff and can have dynamic size even during run-time ;)
This is where it falters at:
float remaining_balance = balance - principal_paid;
try changing it to something like:
lol Let Us C by YK can be used as a book to refer to so as to know how not to code :P ...
For C++, you dont need to start out with C. If your final aim is C++, better you start of directly with it...
#include "<iostream>"
using namespace std;
int main(int argc, char* argv[])
{