Denniz 103 Posting Pro in Training

Today I learned that I have diabetes in my right eye. I've had the disease for about 10 years, and this was the first time my eye doctor detected any signs of it in my eye. Guess its about time I stop eating all those pizzas, McDonalds hamburgers, DQ cones and other fast food junk -- I'm a real junky for that too :'(

So will it affect your eyesight? Do take care, this place needs your ancient wisdom! :)

Denniz 103 Posting Pro in Training

Just for giggles - I translated the Russian: - spam, surprise,surprise

I just learnt how russian language looks like :P

Denniz 103 Posting Pro in Training

Isn't it easier to google "risc" and "cisc", than typing all those homework out in a forum?

Denniz 103 Posting Pro in Training

You can download GLUT from the net. Use google to search.

As for OpenGL files, they normally come with most C++ compilers/IDE.

Denniz 103 Posting Pro in Training

Hey I like this topic. Its around 11am here. I am planning to start a new site and today I am gonna research on the different online advertising schemes available.

Will be meeting my accountant in the afternoon and probably learned about some corporate tax stuff from him.

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb!

Denniz 103 Posting Pro in Training

Welcome to Daniweb! Not all the people here are kids anyway :)

Denniz 103 Posting Pro in Training

Welcome to Daniweb!

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb!

Denniz 103 Posting Pro in Training

Welcome to Daniweb!

Denniz 103 Posting Pro in Training

You still don't get it.

It should be:

ticketstotal - moneyprizes - (ticketstotal * percentticket/100.)

Denniz 103 Posting Pro in Training

Nice intro...welcome to Daniweb! Don't worry about sounding old, there's plenty of older people here. :)

Denniz 103 Posting Pro in Training

The conversation between the computer and interogator is funny. :)

Denniz 103 Posting Pro in Training

Simply combine line 36 and 37 will solve your problem:

[INDENT]cout << meanOf3(value1, value2, value3);[/INDENT]
Denniz 103 Posting Pro in Training

When you declare an integer array of say size 3, you are actually statically allocating storage in memory for 3 integers, starting from the address the array/pointer points to.

When you try to access say the 5th element of the above said array, you are actually trying to access a memory location that you did not allocate for. Therefore, this could lead to unpredictable behaviour, and even crashing of the program because it is trying to access an invalid memory location which is probably hold by other process/application.

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb, the people here are very helpful! :)

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb!

Denniz 103 Posting Pro in Training

Welcome to Daniweb, there are a lot of helpful people here!

Denniz 103 Posting Pro in Training

Hi Michael, welcome to Daniweb!

Denniz 103 Posting Pro in Training

Hi Eddy, welcome to Daniweb!

Denniz 103 Posting Pro in Training

Welcome to Daniweb!

Denniz 103 Posting Pro in Training

I see....I intuitively think of simulation whenever I saw the flipping of coins or rolling of dice.

Denniz 103 Posting Pro in Training

alright thanks Denniz :D
im almost finished just one problem. when i run it instead of getting 230000.00 i get 234998.00 ? im using float now no more int.

That's because you deducted the wrong thing. Instead of deducting the total admin overhead, you deducted the $2 admin fee!

This question is actually very straightforward, apart from the programming syntax, you should also understand the logic behind all these calculations. Understanding of logic doesn't need programming background.

Denniz 103 Posting Pro in Training

Why would one need to generate a random number to display all the permutations?

My understanding of the question is that it is simulating the flipping of a coin, which is 50% head and 50% tail.

Denniz 103 Posting Pro in Training

Any idea with the other issues not concerning the patterns:

Agent / Wrapper / Parser / Sequencer 
 classes
These might be sth easy for native english speakers, but since I am such one I need your help out there :D

P.S. I prefer always learning sources where the examples are complete, because I always try to do them by myself and check my results with theirs after I am finished.

If you are asking for examples, I can try provide a few. One example of wrapper classes implementation would be the Microsoft Foundation Class (MFC) libraries. It basically consists of a library of classes, most of which are wrapper classes that wrap around the old Win32 API.

As for parser, it is typically used in compilers to perform lexical analysis. If you are familiar with compiler design you would know about parser. But in general, parser can also be used in normal application that needs to interprete a string of text, or commands, or scripts.

I am not quite sure in what context this "Agent" is. Is it the intelligent agent used in AI for human preference tracking?

As for sequencer, I do not know whether you are refering to iterator. If so, then it is kinda commonly used in programming.

Denniz 103 Posting Pro in Training

Hi Deniz and thanks for the post.

However allow me to disagree to:

I think OOP is language dependent since for example C++ is an object oriented language while C is not. Furthermore, Java for example is also OO but the implementation differs from the c++ case. Nevertheless I am going to post my questions in the "Computer Science and Software Design" section too.

It's ok to disagree with me. However, I would still say that OO concepts such as data encapsulation, inheritance, polymorphism, abstraction, etc are independent of programming languages. Languages implement concepts, but concepts exist before the implementation.

That aside, I believe the definition and when to use the patterns are well described in the design pattern book. I believed they gave examples too (can't really remember, its been so many years since I read that book). Actually, I would say these patterns though well-documented, should only used for references but not as constraints to creativity. Afterall, developers have been using these patterns before they are documented by the gang of four.

Denniz 103 Posting Pro in Training

now im having issues on calculating these things
Amount deducted for prize money: $ 15000.00
Balance raised for charitable fund: $ 230000.00

What's the difficulty in calculating these two items? The first one is straight from the value the user entered, the second was just the total revenue deducting the admin fee & prize money.

and idk why but the setprecision is not working on
Revenue generated from ticket sales: $ 250000.00
it works fine for
Amount deducted for administrative overhead: $ 5000.00

?????

That's because you are using integers. Alright, put a decimal point behind the number "5" and magic will appears.

anbuninja commented: thanks for all the help =] +1
Denniz 103 Posting Pro in Training

Is it part of the requirements to use recursive function? This program can be done easily without recursive function. Just use a loop is enough.

Also, check out rand() function to generate random number, and srand() for seeding the random generator.

Denniz 103 Posting Pro in Training

Hi Roland, welcome to Daniweb!

Denniz 103 Posting Pro in Training

Welcome to Daniweb!

Denniz 103 Posting Pro in Training

Welcome to Daniweb!

Denniz 103 Posting Pro in Training

Hi Val, welcome to Daniweb!

Denniz 103 Posting Pro in Training

Welcome to Daniweb! I don't know anything about Mac too. :) (I do know something about MAC protocols)

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb! Just post your question at the relevant forum.

Denniz 103 Posting Pro in Training

Welcome to Daniweb!

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb!

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb!

Denniz 103 Posting Pro in Training

I am not sure this is the correct section for this thread, since OO concept is independent of langauges.

This aside, if you have not read the book "Design Patterns - Elements of Reusable Objected Oriented Software" by the gang of four, I would recommend you to read it first.

Denniz 103 Posting Pro in Training

Comments are ignored during the parsing stage. It has totally no effect on the final executable.

Denniz 103 Posting Pro in Training

Do you really expect people will do it for you?

Denniz 103 Posting Pro in Training

Use Win32 console application option, since you are using GLUT to handle the user interfaces.

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb!

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb! 1971....that was even before I was borned!

Denniz 103 Posting Pro in Training

Welcome to Daniweb, John!

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb!

Denniz 103 Posting Pro in Training

I believe you need to use recursive functions.

Denniz 103 Posting Pro in Training

I need the source code for controlling rockets. Can anybody send me? :)

Denniz 103 Posting Pro in Training

Visual Studio comes with OpenGL. Go search under the visual studio folder, you should be able to find those files.

GLUT is a third party utility tool supporting OpenGL that handles the user interface stuffs. It doesn't contain OpenGL files.

Denniz 103 Posting Pro in Training

C++ is the object-oriented version of C.

Denniz 103 Posting Pro in Training

When you are using the printf function:

printf("%s", a);

The function is treating variable "a" as a pointer to the beginning of a stream of characters. However, it doesn't have the information about how long the stream of characters is, it has no knowledge that "a" is defined as an array. Thus, the function will simply read from the beginning of the address that "a" points to, byte by byte, until it encounters the null character which indicates the end of a character string.

Integer, float and other types are not used to represent string.