Denniz 103 Posting Pro in Training

Hi welcome to Daniweb! I had learnt all those languages you mentioned except modular-2.

Denniz 103 Posting Pro in Training

Hi Ric, welcome to Daniweb!

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb!

Denniz 103 Posting Pro in Training

Welcome to Daniweb! U can post your queries in the java section.

Denniz 103 Posting Pro in Training

Just notice another problem. Instead of using :

else if ( 15000 < income <= 44000)

you should write it as something like:

else if ( (15000 < income) && (income <= 44000))

instead, for each of the "else-if" statement. Or else, all income greater than 15000 will go into the first "else-if" scope because the compiler will compute (15000 < income) as 1 (true), and then compute (1 <= 44000) as true.

Denniz 103 Posting Pro in Training

Just add a decimal point behind each 100.

Denniz 103 Posting Pro in Training

It is a place for people to find IT related jobs because those technology companies will be having their booths there for recruitment purposes.

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb!

Denniz 103 Posting Pro in Training

Had fishball noodle for breakfast this morning :)

Denniz 103 Posting Pro in Training

Hi Shinaya, welcome to Daniweb!

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb! Nice intro :)

Denniz 103 Posting Pro in Training

Welcome to Daniweb! You can check out the hardware section.

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb!

Denniz 103 Posting Pro in Training

That's very ambitious. How long do you think you would take to finish this 6000-page book?

Denniz 103 Posting Pro in Training

1. Please use "int main()". You are returning 0 at the end of main(), yet you declare that main() return void.

2. You lack a closing brace "}" and a return statement for do_next_op().

Denniz 103 Posting Pro in Training

What's the purpose of this thread??? To show an inferior implementation of stack?

Denniz 103 Posting Pro in Training

I know it isn't free, but does Visio suits your purpose? Or even MS Word can be used to draw blocks and arrows, if that is what you want.

Denniz 103 Posting Pro in Training

Hi Samuel, welcome to Daniweb!

Denniz 103 Posting Pro in Training

Where's your switch statement? You should do something like this:

switch(choice)
{
case 'A':
    if(hours > A_ALLOWED_HOURS)
    {
        // Compute charges
    }
    else
    {
       // Charges is equal to A_FIXED_RATE
     }
     break;

case 'B':
     if(hours > B_ALLOWED_HOURS)
    {
        // Compute charges
    }
    else
    {
       // Charges is equal to B_FIXED_RATE
     }
     break;
 
case 'C':
    // Charges equal to C_FIXED_RATE
    break;
}

Then display out your computed charges.

Denniz 103 Posting Pro in Training

Alright, I will comment base on your latest codes, cos I don't really have time to go through all the posts. Also, I will skip removeAt() function at this moment and focus on the rest.

1. At the main function, you are still passing uninitialized variables "insertItem" and "index" by values to the functions (line 24 and 25). If you have no use for them, take them out from the parameters. Use local variables instead.

2. Line 140 should be this instead:

cout<<"After inserting the item at position "<<index<<", array

3. At line 144, according to your instruction at line 132, it should be the following instead:

numbers[index] = insertItem;

4. Still, if you perform point 3, you are only OVERWRITING the array item, not inserting it. If you are going to continue using integer array for insertion, there are 2 ways you can do about it:

a) Declare a large array size (say 100) initially, fill the first 12 with your numbers and leave the rest. When doing insertion at say position #2, first use a loop to "push back" all items from position #2 onwards, then write the new value at position #2. Something like this:

for(int i=length; i > index;i--)
{
number[i] = number[i-1];
}
number[index] = insertItem;

You need use the variable length to keep track of the up-to-date length of the array that is filled.

b) The second method would be using dynamic memory allocation for the number …

Denniz 103 Posting Pro in Training

Is python really that good? Sorry I came from a C++ background, using C/C++ for more than 10 years but never touched on python before. Been hearing good things about python here.

Can someone give me a brief intro of python?

Denniz 103 Posting Pro in Training

in a c++ book i read a statement like this : java is c++ without the bugs. i have never worked with java though, but i believe java is like c#.

You sure that's a c++ and not java book?

Denniz 103 Posting Pro in Training

I learnt some php today....

Denniz 103 Posting Pro in Training

Hi Frank, welcome to Daniweb!

Denniz 103 Posting Pro in Training

Hi Ajay, welcome to Daniweb! U can contribute your part or post your query at the java section.

Denniz 103 Posting Pro in Training

Hi welcome to Daiweb!

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb!

Denniz 103 Posting Pro in Training

thank you for your reply~
I know what you mean by CriticalSection,unfortunately my developing evironment is C,nothing to do with MFC(sorry for not mentioning it in the post).
under pure C,the CriticalSection APIs is also available,as I know ,it is used to synchronize the operation between thread ,that is : within the process.
what I want is to operate interprocessly.(sorry for not metioning this,either :P)
that is : read_write lock between processes.
Is there any version of free source around the www?

You can use CreateMutex() to create a named mutex. Then use WaitForSingleObject() to wait for the mutex, either for a fixed timing or infinitely. Then call ReleaseMutex() to release it.

Denniz 103 Posting Pro in Training

Welcome to Daniweb! Have a nice day! :)

Denniz 103 Posting Pro in Training

Other options (online ones) would be sites that generate frequent updated contents and attracting lots of traffic, and earns from ads revenue.

Denniz 103 Posting Pro in Training

You can use CCriticalSection object if you are using MFC. They are less expensive than mutex.

Else, you can use InitializeCriticalSection(), EnterCriticalSection() and LeaveCriticalSection() for the same purpose.

Denniz 103 Posting Pro in Training

Are you sure your program runs fine? At the first glance, there's so many errors in it:

1. Your main function is passing uninitialized variables' values like index and insertItem into removeAt() and insertAT() functions.

2. Inside insertAt() function, index and insertItem are treated as local variables. That's very bad programming. If you don't intend to pass values, you should simply declare those as local variables instead of parameters.

3. In insertAt() function, the variable item is neither initialized nor assigned any values, yet it is used at the end of the function inside the loop. This leads to some undefined behaviour.

4. You only check once for invalid user input. You should use a loop such that the program will always prompt the user for inputs after each invalid inputs.

5. You use insertItem for the item to be inserted, and index for the position to be inserted. Yet in the below code you never used the variable index! You should used it as the index of the array.

numbers[insertItem-1] = insertItem;    
cout<<numbers[insertItem-1]<<" ";

6. Even if you rectify for point number 5, it still doesn't achieve what you want. It merely overwrite the existing array item with the new item, instead of inserting the item into the position stated. To do what you want, all the subsequent array items must be pushed backwards. If you want to use integer array, then you need to manually "grows" the array to cater for the …

VernonDozier commented: Good points. +8
Denniz 103 Posting Pro in Training

Welcome to Daniweb!

Denniz 103 Posting Pro in Training

Welcome to Daniweb! Hope you enjoy your stay here!

Denniz 103 Posting Pro in Training

I believe you still need to do programming, especially when you are at an entry level software developer job. Software design and programming are closely related, and having strong programming skills provides a sound foundation for software design.

Denniz 103 Posting Pro in Training

It really depends on your work nature and environment. If you are working with team members that are stationed overseas, or integrating with systems where their developers are not local, you would need a lot of communications. Also, we need to document our technical specifications and source codes so that other people can reference them, even if we no longer stay in the company.

Denniz 103 Posting Pro in Training

You need to seek help from a counsellor, not in Daniweb where we communicate better with computers than with humans.

Denniz 103 Posting Pro in Training

Welcome to Daniweb!

Denniz 103 Posting Pro in Training

It depends on your budget and your requirements. Do you want people to reserve online via internet, or is the software just keeping track of reservation status made through phone calls?

Denniz 103 Posting Pro in Training

Welcome to Daniweb! I would advice you to learn about HTML first since you said you have no knowledge about it. It's just a markup language and would be very easy for you to pick up. After that, you can learn about some client-side scripting, which is also not difficult given your knowledge in VB.

Denniz 103 Posting Pro in Training

Welcome to Daniweb! So u wanna build transformers? It's always good to have dreams :)

Denniz 103 Posting Pro in Training

Welcome, its a cool site I agreed.

Denniz 103 Posting Pro in Training

Hi welcome to Daniweb! Do post your queries at the C or C++ forums...

Denniz 103 Posting Pro in Training

Hi sekhar, welcome to Daniweb!

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

You can also convert the integer into a string, and then retrieve the particular nth placed digit of the string.

Denniz 103 Posting Pro in Training

You can post whatever queries you have here, there are many helpful people in Daniweb!

Denniz 103 Posting Pro in Training

Having fish soup just now....:)

Denniz 103 Posting Pro in Training

Today, I learned that my harddisk crash :(