~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Everthing comes to an end, sooner or later.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Why not try out the link I posted in my 4th post... ?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Horrifically-scarred, MINERS are sleeping over innocent ILLUSIONS, awakening.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

slack -> attack

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Inevitable things are so inevitable.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

but for some

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

even think of

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yes true, but you are missing the point here. You just can't have a software which claims to create *.fla files and that too hand it out for free.

OpenOffice exists, that's true, but I hope you realize they can't even think of extending support for *.doc files (anyways only MS knows the format headers though there is always possibility of reverse engg).

A software which performs in a same way as another software is good to go, but a software exactly same as a licensed software sure sounds like walking on barbed wire.... ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Don't try to manually color the code which you post. Just put the code in code tags and it would be displayed accordingly.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hey there SubTonic, welcome to Daniweb. :D

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

one should try

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Schools out for summer.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Horrifically-scarred, lifeless soul-reapers are sleeping over INNOCENT children, hideous.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

ship -> sheep

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

a tinge of

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hmm, yes I looked at it very briefly. I guess the title open source flash is rather misleading.

Flash software was developed by Macromedia for a reason -- its proprietary software which has been licensed.

It was kind of expected. You just cant run a site openly which claims to host a free download or replacement to a proprietary or licensed software.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

is a complicated

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

which is really

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Aggregated input results in their average.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

hulking -> sulking

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Horrifically-scarred, lifeless soul-reapers are sleeping over LOST souls, hideous.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Thanks man, :)
So you're from India.. i know that lotsa Indian men are briliant.. especially when it comes to computer.

Thank you for the compliment...:mrgreen:

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

S.O.S stands for distress call, and since I like to help people, my name is S.O.S. ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hey there buddy, welcome to Daniweb. :D

Looking for more answers from you than question... ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Welcome to Daniweb. :D

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hey there girly, welcome to Daniweb... :D

Good to meet a House / Scrubs fan... ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Welcome aboard my friend, welcome to Daniweb. :D

And its okay if you have bad English, its not my first langauge either.. ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

If you are ready to put in this much effort, then why not learn an API which is portable and which can be programmed in a multitude of languages. Something like wxWidgets and the likes.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Seeing that you are ready to take in real knowledge and are inquisitive about it, I would recommend you read this. Posted by one of our moderators WaltP.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

a place where

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Someone ought to close this thread, its getting insanely long.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

junk food -> obese

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

conservatives -> preservatives

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I still don't see how that example will guarantee 2 decimal places if there is less than that in the original input. I do see how it restrict to 2 decimal places if there is more than that and how it rounds up.

Obviously I can't post entire solutions being a moderator -- its against the site policy... ;)

The OP can always change the << function to implement the behaviour of printing to exactly two decimal points. And since the OP will be using the printing operation infrequently ( the values are meant to basically put in and pulled out from a database I believe ), the overhead of the < < function wouldn't be too much....

But seriously for such requirements whatever we suggest him would be too slow. Consider what you posted -- to many string operations just for the sake of initializing the MyDouble object. Not to forget that strings are classes in C++ and call constructors and destructors. Also since you have stored the data in strings instead of actual double, your realization is too much an overkill considering you have to write your own procedures for multiplication, division, addition, subtraction -- all of them involving string objects, along with taking each and every possible condition into consideration.

Thats why I said to OP:

If that is not acceptable to you then the only option left is to use the technique used by Compiler writers and Language designers to create your own …

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

No the output is not enough for me. I am very confused. I thought that this issue was a simple, widespread one and the answer would be an easy one. Some huge number of people should have needed it before me. Ok I understand that it is not the way I thought it was. The second thing, I perceived and believed that C and its derivatives were strong tools for programming. Now comes my new questions: Can you tell me? Where are the answers and/or the people who know the answers are hidden? In my first post I had said that i had searched hard in the net. Where can i go back to the beginning to learn searching in the net?(Seriously and truly) Is the time of C and the derivatives over. Thanks to every one for their interests and offers.

I already posted a dummy implementation on how you should go about creating your own datatype from the existing ones. If that is not acceptable to you then the only option left is to use the technique used by Compiler writers and Language designers to create your own primitive datatype -- a task which would definately not be easy on all accounts.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Interesting things should be dealt with first, leaving off the uninteresting ones to bug you later on.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I want to have a variable that is born as rounded to 2 decimal digits,processed as rounded to 2 decimal digits and finally posted to MS SQL as rounded to 2 decimal digits.

You can always do something weird as this:

// WARNING: Untested
#include <iostream>
#include <cstring>
#include <sstream>

class MyDouble
{
    public:
        MyDouble( ): var_(0.0) { } ;

        MyDouble( double var )
        {
            var = var * PRECISION ;
            var = static_cast<int> ( var ) / PRECISION ;
            var_ = var ;
        }

        friend std::ostream& operator << (std::ostream& ostr, MyDouble& obj )
        {
            ostr << obj.var_ ;
            return ostr ;
        }

    private:

        static const double PRECISION = 100 ;
        double var_ ;
} ;

int main( )
{
    using namespace std;

    MyDouble a( -9.5 ) ;
    cout << a ;

    cin.get( ) ;
    return EXIT_SUCCESS ;
}
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

5) overloaded << operator that uses setprecision(2) to limit output to 2 decimal points

setprecision doesn't control the number of decimal points that can be outputted but the total number of digits worth of precision you want.

eg.

double val = 1.23456 ;
cout << setprecision( 1 ) << val ; // will output is 1 and not 1.2

double var = 1.8234 ;
cout << setprecision( 1 ) << var ; // will output 2 and not 1
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

only on output -- internal representation of the double will not change.

Isn't that what he wants.. ?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

One more thing, plz tell why is it preferrable to use int main(void) and return 0 rather than simply void main() . thnks a lot

Because that is what the C standard says.. ;)

There are only two correct prototypes for main( ) :

  • int main( void )
  • int main( int argc, char* argv[] )

And only three valid values which main can return:

  • return 0
  • return EXIT_SUCCESS
  • return EXIT_FAILURE

Anything else is implementation / platform dependent and may make your code non portable.

So in the end the whole hassle is about keeping your programs portable and makign sure that a standard exists which every C / C++ developer follows.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Probably not because such a class still has all the properties of double data type. You would need a class that does not depend on either float or double if you always want an exact precision. doubles and floats can not give that to you.

I guess his last two points would take care of that one....

5) overloaded << operator that uses setprecision(2) to limit output to 2 decimal points
6) overloaded >> to input double into data

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Two questions rolled into one ... what is the difference between Virtual Memory and a Page File

You are getting confused -- Paging is a mechanism used to implement the concept of virtual memory. Paging is a mechanism in which the entire virtual memory is divided into pages -- pages which on demand can be pulled in them physical memory as and when required and written to secondary storage when they are no longer needed (process is idle, etc.). A page table is used to maintain the mappings between the pages and frames i.e. for a chunk of data if it resides at a virtual address X then its physical address is Y and vice versa. Hence whenever data is moved out from the Physical memory or brought into it, changes need to be made to the page table.

and how is this different from Linux swap?

The main difference lies in their names. Swapfiles operate by swapping entire processes from system memory into the swapfile. This immediately frees up memory for other applications to use.

In contrast, paging files function by moving "pages" of a program from system memory into the paging file. These pages are 4KB in size. The entire program does not get swapped wholesale into the paging file.

Also, with a whopping 8 gigs of RAM, why are 2 full gigs used up of this virtual memory?

I think both you and Joey and confused as to what "Virtual Memory" actually stands for the physical …

Dortz commented: Noone ever actually explained it to me fully. +2
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

to the washroom.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Protected, wait I have heard this word in the context of C++..

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

of the Yak

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

spend -> extravagant

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Horrifically scarred, lifeless soul-reapers are sucking over departed souls, HIDEOUS.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Of course considering

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Flash software was developed by Macromedia for a reason -- its proprietary software which has been licensed.

For developing Flash applications you have to use Flash.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

THANK YOU FOR HELP!
Now it's working!

You are welcome... :)