Learner010 99 Posting Whiz in Training

I'm using mathjax in ckeditor and i want to print the fraction (uploaded here in the link Click Here).So,what command i have to write to print that fraction ?

Here is what i'm trying :
$$7\(frac\({4}{3}\)\)$$

But it isn't working.
So , please suggest me a solution

Learner010 99 Posting Whiz in Training

first off, i've never been to web development.
I'm developing my personal website where, for some purpose , i need to display some math figures. And somebody suggested me to use mathjax for this purpose. i tried it on my own. it works. but i see some font-size related issues.
Here is what i did.
I add the library using this :

<script type="text/javascript" async
  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script>

then i put the maths text in body section. like this

<body>
\(x={72^2-{\sqrt{53^2}}\over 25}\)
</body>

when i see it in the browser , it shows the maths figures but in very small font.

when i used the following , it showed it in the size what i want

<body>
$$x={72^2-{\sqrt{53^2}}\over 25}$$
</body>

So , here my question is : what is the difference between these two syntax

\(x={72^2-{\sqrt{53^2}}\over 25}\) [syntax 1]
$$x={72^2-{\sqrt{53^2}}\over 25}$$ [syntax 2]

And how to increase the font size using the [syntax 1]

thanks in advance.

Learner010 99 Posting Whiz in Training

I'm back here after a very long period. And see lots of changes here. Beautiful and amazing design.
I was missing some illustrious members. here is who are they ? and why i still know them :

Reverend Jim provided full assistance while i was learning vb.net . i still remeber his great help in my first vb.net project (it was tic tac toe game). I learned lots of things from him. Sir , you're great.

deceptikon motivated me to write my first tutorial.He explained some of c++ concepts(operators and array).

mike_2000_17 is great person. He made concept of recursion very easy for me. To understand the concept i used to be in his shoutbox in late night. Hope he finished his PhD.

And, of course, dani for providing such a nice platform(daniweb.com).
looking forward to meeting similar kind of people in my journey of Android app Dev.

Now come to the topic.
I know c++ andvb.net. And little bit Java. Now i want to learn how to develop android apps. I'm totally new to this.
the only thing i know about Android dev. is that " i have to write code in Android studio" and i've downloaded it.

please suggest me some good websites/books where i can learn the basics of Android app dev. I'll start on my own and i'll be here with the code where i get stuck.

Thanks.

Learner010 99 Posting Whiz in Training

so what should i use instead of <conio> ??

I think nothing.Because in your code you use conio for just getch() function.I never realized the need of using conio and i think will never realize because i use standardize c++.And there is no need to use getch() for finishing a prgram by pressing any key.Its automatic (i don't know why ?).You can use code::block IDE which comes with GCC.

i think you are probably working with old aged compiler(like turbo)

my compiler doesnt show me void main() in error msg ..

But it should at least give a warning message.check it.

i write int main() then
should i write at the end of program return 0;?? .

yes, it will expect to return an integer value and this case and return 0 means your program executed without errors.

nd can u write an example program for me please ..

Sure ,here is the sample code :-

#include<iostream>
using namespace std;
int main()
{
cout<<"i'm back to daniweb.";
return 0;
}

hope this helps you.

ddanbe commented: Nice! +15
Learner010 99 Posting Whiz in Training

in arguments and return part, if the first condition is true then x is returned to the main function with the value it carries?

It will return x if x is greater than y and z.And Yes, value of x will be returned to the main in this case.

Learner010 99 Posting Whiz in Training

okay , i make it more clear.Actually i don't more about ip.i heard that it could be done using ip addresses.

it should ask to enter ip address for any destination machine and will connect to it.

what i want is that a chat system without having database stored on server.i don't wanna purchase hosting service to just store my database there.for this, the application will uses database on both machine(sender machine and receiver machine)

now i again ask , is that possible ?

Learner010 99 Posting Whiz in Training

hello

i want to create a chat application. i will design it once i get the idea of how it works.the chat will be based on ip addresses.

is it possible to create a chat system which uses ip address for chat communication?how can i do that ?i am unaware about ip addresses and something like that.somebody suggested me that you have to purchase hosting service where you'll host the database as a chat log.on the other hand , some suggested that you can do that using their ip addresses and databases installed on the device(don't need hosting services).

i offer your views on it.

Learner010 99 Posting Whiz in Training

Did you by any chance happen to have discharged the battery completely while playing a heavy duty game? If so, I would bet your battery is toast. Reaching the minimum charge on a battery while drawing a lot of current from it can easily cause permanent damage to it, after which it can't be charged fully again.

Correct.
I think the battery has deep discharged.

Learner010 99 Posting Whiz in Training

thanx for valuable replies.
but i want to send parameter(pointer to an array of n elements) and retun pointer to array and then delete it from main.

what syntax to write ?

Learner010 99 Posting Whiz in Training

Here is the code illustrating the concept

int* allocate()
{
    int* p=new int;                 //dynamically allocation
    *p=10;
    return p;                       //returning pointer
}
int main()
{
    int* p1;
    p1=allocate();
    cout<<*p1<<"("<<p1<<")"<<endl; //memory still occupied
    delete p1;                      //now free it
    cout<<*(p1)<<endl;              
    return 0;
}

hope this helps you.

now my confusions :

@mike
i want this(allocate(n)) and therefore i changed declaration to this (int* allocate(int n)).And here is my code.

int* allocate(int n)
{
    int* p=new int[n];
    cout<<"base address="<<p<<endl;
    for(int i=0;i<n;i++)
    {
        cout<<"value will be stored at("<<p+i<<")";
        cin>>*(p+i);
    }
    return p;
}
int main()
{
    int n;
    cout<<"how many integers";
    cin>>n;
    int* p1;
    p1=allocate(n);
    for(int i=0;i<n;i++)
    {
        cout<<*(p1+i)<<"("<<p1+i<<")"<<endl;
    }
    delete p1;
    for(int i=0;i<n;i++)
    {
        cout<<*(p1+i)<<endl;
    }
    return 0;
}

I want to allocate memory within a function and deallocate inside main().but this statement (delete p1) only delete a single element(doesn't delete entire block). i want to delete entire block.therefore , i think i need to use pointer to array but i'm unable to do with that(don't know how to return pointer to array). could you please modify my code according to that requirement ?

Learner010 99 Posting Whiz in Training

When I dynamically allocate mem within a function, do I have to still manually release it? Or does it go away once the function has run and returned (like local variables)?

if you dynamically allocate memory using new then you have to release it using delete or delete[].Otherwise there could be memory leak.

If I do have to release it, since it's basically a pointer can I do that from main? Do I have to return the address to release it from outside the function?

I'm keen to know more about this way.i have never done this before.but i think if you return a pointer (pointing to the memory address) , then its possible.But i again say that i have never done this before.Hope somebody could explain it deeply.

Learner010 99 Posting Whiz in Training

without using while loop or user defined function?

with this line , your question becomes very easy.I'd say use library function.I think its str.length();

Learner010 99 Posting Whiz in Training

there are a few mistakes in your code.

1.

when you're defining a return type as bool then why are you returning an integer.so either make it int or change your return value to true/false.

2.

for (i = 0; i <= signedNum.length(); i++)

suppose signedNum=3.14 then its length is 4 but its last element is at 3rd index.therefore change this line to this

for (i = 0; i < signedNum.length(); i++)

3.

include only those lines in loop which are necessary(to be placed inside loop).your this line else if (signedNum[0] == (str[0] || str[1]) && isdigit(signedNum[1])) inside loop doesn't make sense. so you could write this just before loop.Add this just just before loop

    if ((signedNum[0] == str[0] || signedNum[0]== str[1]) && isdigit(signedNum[1]))
        {
            check = 1;
        }
    else
    {
        cout<<"number is either not signed or not numeric";
        return 0;
    }

Now start your loop with 1(i=1)

at last in loop, write this

    if(j==0) //if j==0 then number contain '.'(its real number) and return 1 otherwise return 1-1(i.e check-1)
        return check;
    return check-1;

Now , in main declare check as integer type.

you might also consider to return a value , in main(). therefore write this at the last line

return 0;

now your code would look like this :

int isvalidReal(string signedNum)
{
    int check;
    int i = 0, j = 1;
    string str = "+-.";
    if ((signedNum[0] == str[0] || signedNum[0]== str[1]) && isdigit(signedNum[1]))
        {
            check = 1; …
Learner010 99 Posting Whiz in Training

i think new operator is associated with pointers(however array items can be accessed using a pointer).In this case i think new operator is good choice.

if OP is using new operator then he might also consider using delete[]. otherwise there would memory leak.correct ?

Learner010 99 Posting Whiz in Training

Sorry for disturbing . . .

i never use conio.h because i'm learning C++(and hopefully ,there isn't like conio.h).But i often see some threads indirectly focused on conio.h.All the exprets criticise for using conio.h.

Furthermore it's old and unsupported,

why is it unsupported ?i want to know how conio.h was helpful and why did they discontinue conio.h.

it goes back to Turbo C and then i need to run it again to view the result.

i read similar threads. As a temporary solution , you can either use
getchar();
or
you can use system("pause");. But be aware , its horrible , its Operating system dependent and therefore may not work on other OS.this statement actually run DOS command. before using this , you have to add stdlib.h in which system is defined.

Learner010 99 Posting Whiz in Training

C++ does not support them as can be read in the standard (8.3.4.1).

thanks.i get it.you were correct.

An array bound must be a constant expression. for variable bound , there are vectors.
But i think GCC Compiler runs the code without throughing any error or warning.

Learner010 99 Posting Whiz in Training

Hey if you want to enter age and weight of 5 persons why don't you use the concept of arrays.

if you read the question carefully , the OP want to calculate the total of ages of such who are having above 70kg weight.Here , The use of array is not required since it isn't necessary to store it in an array. And i'd say that in this case , don't use array because it will cover a chunk of memory which is larger than single weight and age variable.

your code will require 5*4=20bytes for age array and similarly 5*4=20bytes for weight array(Size of variable is compiler dependent , i think so).The same requirement can be fulfilled with single age and weight variable(4 byte each).In this case i prefer the way that the OP used.

you might also consider to use float for floating point values.therefore, use weight variable as float rather than integer.

I think using arrays would be a better choice as atulgupta suggested.

How ?

Learner010 99 Posting Whiz in Training

// It says that the expression must have a constant type?

perhaps you are working with pre standard c++ in which array size must be a constant value.variables are not accepted.

After its standardization , array size can be specified with a variable.

Learner010 99 Posting Whiz in Training

Well Done !
its now 1.11M Members.

Learner010 99 Posting Whiz in Training

MM is an abbreviation for million

Correct. But you can either use only M or MLN

since M can be confused with the roman numeral meaning thousand.

then why don't you use this(roman equivalent to one million) 987f4151d95c0cce0189b5af3254c38b

I do wonder how many people today would see 1M and think in terms of Roman numerals?

I think that 1 out of 1M will consider M as equivalent to thousand.But there would be millions of people, certainly confused(as i did) about MM And I do wonder how many people would use roman numbers for such big numbers(thousand) and if it is used in context to roman , most of the people will misunderstand it(they all will think it as million instead of thousand).

When it comes to use roman numerals with big numbers , nobody prefer roman numerals . They use more famous abbreviations(like k for thousand , M for million etc).However it(M) is romand equiavalent But I have never seen M using as roman equivalent to thousand, because its not popular.I'm sure that if you could have written M instead of MM then probably this thread wouldn't not has taken place.

the number got so big it started to not fit for people on small monitors and with long usernames.

Thats why i say why don't you use single M instead of double M(MM) ? It require less space. LOL :)

MM sounds bizarre , you could use either …

Learner010 99 Posting Whiz in Training

its not hard.
first off , just locate where is EXE for MS Access and then put the address in shell statement.this is what i've in vb.net , i'm not sure about this in vb6.But i think that it should work.

Shell("C:\Program Files\Microsoft Office\Office14\MSACCESS.exe")
Learner010 99 Posting Whiz in Training

I would again say that read the thread again.I already pointed out the line , once again i do so ,

if it is not divisible by any of these.

focus on the string "any of these". do you get it now ?therefore || is used.

correct condition would be :

if(num%2==0 || num%5==0) 
{
    print the message saying  "Number is either divisible by 2 or 5 or 10"
}

now the if statement will get executed whenever the input is either divisible by 2 or 5.(number which is divisible by 10 must be divisible by 2 too.).therefore no need to put one extra condition like num%10==0.

your code would be preferrable if the condition all of these exist in the place of any of these. And your code will print not divisible if 15 in inputted. Hope you understand now.

where is preview button to watch preview before post

In comment Box , second last button(colored green).

Learner010 99 Posting Whiz in Training

run enter 50 answer is divsible. if enter 35 ans not divsible.

if you read the question carefully then you would notice this (if it is not divisible by any of these.). That means you now need || rather than &&. therefore your statement which i quoted is absolute incorrect. then correct one is run enter 50 answer is divisible . if enter 35 ans divisible.

Learner010 99 Posting Whiz in Training

scanf is dangerous.

would you please explain why scanf is dangerous for getting input to numbers. if it is dangerous then what function should be used for getting input to numbers.

weight (ex: 92.5):

if So , then why don't you decalre weight as float type.

Learner010 99 Posting Whiz in Training

it takes value of a vairable or only takes adress of vairable ??

pointer variable takes address of another variable which must be same as pointer type.you can't point float variable using pointer to int declaration.you must have pointer to float in this case.look below :

int* ptr;
int x=10;
float y;

ptr=&y; //Incorrect . Because ptr is pointer to int and it can't be used to point float.

ptr=&x //Correct. Because Both type are same.the statement will assign the address of x to pointer ptr
print *ptr //*ptr is de referencing(i.e. get the value at address)
*ptr=20 //set the value at address .Now x becomes 20
Learner010 99 Posting Whiz in Training

First off , there is no need to use #include<stdlib.h> and #include<math.h> because there is no such need in your code.

i agree with both of the above replies.

Use the OR operator instead of &&.

correct. Use OR(||) operator and the problem will be solved.

if number is divisible by 10 ... it is ALSO divisable by 5 and 2 ...

absolutely correct.

but the op is saying " if it is not divisible by any of these". it means you the condition (num%10==0) will fail in case the value is 2,4,6 etc. So , if you want to check if number is either divisible by 2 or divisible by 4 or divisible by 6 then you have to use the following condition with OR(||) operator.

if(num%2==0 || num%5==0 || num%10==0) 
{
    print the message saying  "Number is either divisible by 2 or 5 or 10"
}

if you want to check whether the number is divisible by 2 AND 5 AND 10 then you just need this one :

if(num%2==0 && num%5==0)
{
    print the message saying "number is divisible by 2 And 5 And therefore 10 "
}
Learner010 99 Posting Whiz in Training

first off , don't hijack other's thread. create your own thread.

I give you an answer assuming you're new to daniweb and further won't ask such questions . okay ?

your code will first get input during runtime based on the input it will call related functions(i.e. 1 for jan , 2 for feb and so on).and those related function will strart printing from 1 to last day of the month(i.e 1 to 31 in case of jan).

you might also consider to use default case(as a best practice , you can add default label as last label in switch statement).Here is how default label looks :

switch(var)
{
...
...
...
default:
show_error();
}
void show_error();
{
cout<<"Invalid Input !"<<endl<<"Input Limit is 1 to 12 ";
}

So , next don't ask such question like "what will be the output ? or create a program for ........ or something like that. otherwise you may get flurry of downvotes which finally affects your repuation here ".okay ?

hope next time you won't ask such questions and won't hijack the thread.

Learner010 99 Posting Whiz in Training

If you handle each part as a separate problem you'll probably find you step through it pretty quickly.

correct.

your questions is not difficult. you can solve the homework by breaking it down into smaller parts. and these parts may be of:-

step 1. sort the digits (in ascending order)
step 2. sort the step1's answer in descending order
step 3. subtract step2-step1 and goto step1(with step3's answer).
it continues till you want.

ddanbe commented: Well said! +15
Learner010 99 Posting Whiz in Training

i want to insert text in textbox at specific location(i.e row 2 column 3).how can i do that ?

i tried this but its not working

Me.RichTextBox1.Text = Me.RichTextBox1.Text.Insert(i, CChar(cb.Text))

Learner010 99 Posting Whiz in Training

I was totally unaware about associativity until few days ago(maybe i accidently skipped this section while reading about operators).Anyways , i get this concept while having conversation with mike.Then I decided to add this information to the tutorial But They(Admins) don't agree to change the content citing some policy related reasons.Therefore i add this little information here.

Expression

Expression is made up of variables , constants and operators. Look below(B=10):-

A=B+2*3

Here A and B are two variables and 2, 3 are integer constants. + and * are two of arithmetic operators. Hence it’s an example of Expression. Now the question arise that what operators will be evaluated first. This concept is called operator precedence. Operator precedence tells that what operator will be executed first(i.e it tells their priority ).

For a while , I tell you that* , / , %have equal priority and has higher precedence than + and - . So the solution of the above expression is as follow:

A=B+(2*3) Because * has higher priority than +
therefore * will be evaluated first and then + will be evaluated

A=B+6 
A=16(A=10+6).

Now assume you face such an expression which consists of operators which have same precedence. Look below (I=20,J=2)

K=I/J*J%3

How would you solve this expression? In such case where operators with same precedence exist then we have to solve the expression by keeping the associativity rules in mind. Associativity means that how operator will be executed ?(right to left or left to …

Learner010 99 Posting Whiz in Training

why are you subtracting 3 from the size of the line?

I did so to get the last third position in the string line.

Here is little modification to your code

while(getline(readob,line))
{
    // set temp to a substring of line starting from  3 back from the end

    for(i = 0, temp = line.substr(line.size()-3); i < 3; i++)
    {
        char c;
        c = temp[i];
        total += c - '0';
    }
}

i don't think to opt this code because it has extra variable and extra library function(i heard that it isn't good practice). Correct ?

i want to know more about NULL ?

i am confused by different outputs(i know this is because of NULL)

char stri[]="hello";
cout<<sizeof(stri);

this prints 6
this one

string stri="hello";
cout<<stri.size();

and this prints 5

it appears to me that string variable doesn't terminated with NULL where as actual array of characters does.

Learner010 99 Posting Whiz in Training

For that kind of task, it's preferrable to just read the entire line into a string and then deal with the characters in the string. C++ strings (the std::string class) are just arrays of characters

Yes , the string is array of characters. I declare line variable of type string.

You can read an entire line with the std::getline function

Yes , I did it like this

while(getline(readob,line))
{


}

I think that getline(readob,line) inside while ,will be evaluated as true until EOF , Correct ?

Working Code based on the suggestions
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
    ifstream readob;
    int total = 0,i;
    string line;
    readob.open("file.txt");
    while(getline(readob,line))
    {
        i=line.size()-3;
        for(; i < line.size(); i++)
        {
            char c;
            c=line[i];
            total += c - '0';
        }
    }
    cout << total;
    return 0;
}
Confusion about NULL

There are 9 characters(digits) in a row in a file and its(line) size is 9(I checked it with cout<<line.sizeof(); ). I read somewhere that string is one extra character(that is NUll).And therefore its size should be 10 instead of 9. I don't understand this concept.Would you guys this clear this concept ?

Suggestion to Newbie

write a program in c++ to input two numbers and display

Don't Hijack other's thread. Feel free to create your own thread. And don't ask to write program here , because nobody will do this for you.We provide assistance in case when you prove that you did a …

Learner010 99 Posting Whiz in Training

I think the folder requires administrator permission to copy the files . Try with the folder in D drive

i think it can be solved by starting application with administrator rights. you can do that by running it as administrator.It can be simply find by right clciking on the application icon.

Learner010 99 Posting Whiz in Training

the character '0' will always come before '1' in the code set so '1' - '0' = 1 (integer).

you mean their internal representation is in adjacent format.therefore no matter what character coding we are using because every character encoding sets alphabets in a sequence. correct ?

50-'0'=50 is not correct.

I realized it now. I think this is because 50(integral representation of 2) is ascii value ,equivalent to 2 and '0' is character and its integral representation is 48. that's why it remain 2(50-48). correct ?

I would like to thanks everyone who participate in this thread(special thanks goes to mike and then NathanOliver for clearing the concepts with their deep knowledge).

Sorry for continuing this thread with one more doubt:

How to read last 3 characters in a line(i want to read digits recursively in a line) ?.I have no clue about how to set the file cursor to the end of the line and then start reading.

Once again the BIG thanks for giving your valuable time to this thread.

Learner010 99 Posting Whiz in Training

a lot thanks for very very nice explanation.

but one point is still unclear for me.

To convert a char digit into an integer number, you can just do c - '0'

earlier you said that char is already an integral type therefore there should be implicit type casting (which result in integer because integer is higher than char , correct ?. So , for number 2 there is ascii representation 50 and 50-'0'=50. but infact it does what i want(i.e it is considered as 2 instead of 50 ).

so would you make it(c-'0') more clear for me ?
sorry , if my question is silly.

Learner010 99 Posting Whiz in Training

thanx for your quick reply.
i try the code but it doesn't seem to be working. here is the code

#include<iostream>
#include<fstream>
#include<string>
#include<stdlib.h>
using namespace std;
int main()
{
    ifstream readob;
    string line;
    long int total=0;
    readob.open("file.txt");
    while(getline(readob,line))
    {
        for (size_t i = 0; i < line.size();i+=3)
        total += atoi(line.substr(i, 3).c_str());
    }
    cout<<total;
    return 0;
}

what is missing there ?it prints zero(0) but it should print 10(1+2+3+0+1+2+0+1+0)
one more question : what does it mean by size_t?

Learner010 99 Posting Whiz in Training

hello

i decide to first learn about file streams before learning oop concepts in c++.
want to read single digit from the textfile. actually text file contains numbers from 0 to 9. And these are 9 in a row and 3 row are there. you can think of its content as following :

123456789
012345678
010234567

what i need is that how to read first three digits from each row.Here i'm confused with what data type should i opt. i thought int would be good but later realised that int would read entire line as a number. Now i think that char would be better. further it can be converted to integer using type casting.

the second point is that how read first three digits.for that i use this :

for(i=0;i<3;i++)
    {
        readob>>a[i];
        total+=(int)a[i];
    }

is that correct ?

And the last point is that after reading three digits , how to set readob to newline.

Learner010 99 Posting Whiz in Training

Assume that you are new to daniweb.
Assume that you don't have read the community rules.

Assume the bank has 3 clients. Assume every client has 3 accounts. Use a two-dimensional array to store the credit of each account for each user.

use this

int clientid_accountid[3][3];
clientid_accountid[0][1]={##,#####};
clientid_accountid[0][2]={##,#####};
clientid_accountid[0][3]={##,#####};

and it continues . . .

lastly , Assume that you have learnt the basics of nested loop. And with nested loop you can do that very easily.

Assume , next time , you won't post without the code (you have so far).

Learner010 99 Posting Whiz in Training

please don't supply the answer until you realise that the op tried a lot to solve the question. in this case you're doing his homework which is against daniweb rules.

i would have been given you a downvote if you weren't newbie.but read the community rules.

you can still edit your post.

Learner010 99 Posting Whiz in Training

A fault in C++ !

i'm not in a position to say such.

it should be executed only when no case is true

100% agree with you.

If every case has a break no default will be executed if the switch condition matches a case.

yes , correct. but this is not what the op wants. i think he wants the explanation about "why break statement becomes essential in switch statement ?"

i can't answer the question of why ?but still i say that it is due to flow of control .

This may be fault in c++ because vb.net has improved this(i'm learning it).

Learner010 99 Posting Whiz in Training

Can I be able to write a simple program to accept two numbers in one textbox including an operator +,-,/,*, using vb 2010

yes , it can be written and in fact its very easy to achieve , you just need to put 2 textboxes and 1 command button and make use of arithmetic operators.

you can also accept these numbers using inputbox.

for further assistance , i highly recommend you to post the question in appropriate thread , we have seperate forum for vb.net.

Learner010 99 Posting Whiz in Training

Hello! from India

Namaste

Learner010 99 Posting Whiz in Training

how can you swap 5 numbers?

yes , that is the point. how do you swap these numbers ?

Learner010 99 Posting Whiz in Training

I also believe x will remain in memory (a leak)

how x will remain in memeory ? does it not removed automatically when function return back to main ?

Somebody here could explain about memory leaks . i'm not familiar to that.

Learner010 99 Posting Whiz in Training

you can try this too :

#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
//using std::cout;
//
//CLASS DECLARATION SECTION
//
class EmployeeClass {
public:
        void ImplementCalculations(string EmployeeName, int hours, double wage);
        void DisplayEmployInformation(void);

        string EmployeeName;
        int hours;
        double wage;
        float iTotal_salaries;
        int iTotal_hours;
        int iTotal_OvertimeHours;
        float basepay;
        int overtime_hours;
        float overtime_pay;
        float overtime_extra;
        float iIndividualSalary;
        friend void Addsomethingup(EmployeeClass, EmployeeClass, EmployeeClass);

};
EmployeeClass Employ1;
EmployeeClass Employ2;
EmployeeClass Employ3;


int main()
{

//    system("cls");
    // display welcome information
    cout << "\nWelcome to the Employee Pay Center\n\n";
    /*
    Use this section to define your objects.  You will have one object per employee.  You have only three employees.
    The format is your class name and your object name.
    */

    /*
    Here you will prompt for the first employee’s information.
    Prompt the employee name, hours worked, and the hourly wage.  For each piece of information, you will update the appropriate class member defined above.
    Example of Prompts
    Enter the employee name      =
    Enter the hours worked       =
    Enter his or her hourly wage =
    */
    // Enter employees information
    cout << "Enter the first employee's name      = ";
    cin >> Employ1.EmployeeName;
    cout << "\nEnter the hours worked               = ";
    cin >> Employ1.hours;
    cout << "\nEnter his or her hourly wage         = ";
    cin >> Employ1.wage;
    /*
    Here you will prompt for the second employee’s information.
    Prompt the employee name, hours worked, and the hourly wage.  For each piece of information, you will update the appropriate class member defined above.
    Enter the employee …
Learner010 99 Posting Whiz in Training

check your original(previous) post. i've answered there.

Learner010 99 Posting Whiz in Training

just try the code which i put in my last post. it'll produce the desired output.
yeah , you can ask for better solution.

Learner010 99 Posting Whiz in Training

as i already said that i'm learning oop concept in c++ therefore i couldn't tell the better solution . I think there may exist something by which Addsomethingup is called for once and last only.

So , i can suggest that seperate Addsomethingup from the class and seperate the variables too that this function uses , therefore delcare these variables as global.

anyways , try this for the desired output :

#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
//using std::cout;
//
//CLASS DECLARATION SECTION
//
class EmployeeClass {
public:
        void ImplementCalculations(string EmployeeName, int hours, double wage);
        void DisplayEmployInformation(void);

        string EmployeeName;
        int hours;
        double wage;
            float basepay;
         int overtime_hours;
         float overtime_pay;
         float overtime_extra;
          float iIndividualSalary;

};
EmployeeClass Employ1;
EmployeeClass Employ2;
EmployeeClass Employ3;
float iTotal_salaries;
int iTotal_hours;
int iTotal_OvertimeHours;
void Addsomethingup(EmployeeClass, EmployeeClass, EmployeeClass);
int main()
{

//    system("cls");
    // display welcome information
    cout << "\nWelcome to the Employee Pay Center\n\n";
    /*
    Use this section to define your objects.  You will have one object per employee.  You have only three employees.
    The format is your class name and your object name.
    */

    /*
    Here you will prompt for the first employee’s information.
    Prompt the employee name, hours worked, and the hourly wage.  For each piece of information, you will update the appropriate class member defined above.
    Example of Prompts
    Enter the employee name      =
    Enter the hours worked       =
    Enter his or her hourly wage =
    */
    // Enter employees information
    cout << "Enter the first employee's name      = "; …
Learner010 99 Posting Whiz in Training

did you make them global ?
then call Addsomethingup(Employ1,Employ2,Employ3); .

did you try the code what i posted ?
that's all what i can do. I don't see any other error.

Learner010 99 Posting Whiz in Training

well , i'm also learning about oop concept in c++(please correct me , if i'm wrong).
here you're making a mistake while calling Addsomethingup(); because it requires 3 arguments of EmployeeClass .

you'll get an error even if you pass Employ1,Employ2,Employ3 because you're calling AddSomethingup() in DisplayEmployInformation() that doesn't recognize Employ1,Employ2,Employ3 becuase their scope is limited to main function only.Therefore either declare them as global.

one more problem in your code is that in ImplementCalculations function there is wage variable of type double and you're passing wage parameter which is float. therefore either change float to double or change its datatype in parameter list.

after implementation these little modification , your code looks like this :

#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
//using std::cout;
//
//CLASS DECLARATION SECTION
//
class EmployeeClass {
public:
        void ImplementCalculations(string EmployeeName, int hours, double wage);
        void DisplayEmployInformation(void);
        void Addsomethingup(EmployeeClass, EmployeeClass, EmployeeClass);
        string EmployeeName;
        int hours;
        double wage;
        float basepay;
        int overtime_hours;
        float overtime_pay;
        float overtime_extra;
        float iTotal_salaries;
        float iIndividualSalary;
        int iTotal_hours;
        int iTotal_OvertimeHours;
};
EmployeeClass Employ1;
    EmployeeClass Employ2;
    EmployeeClass Employ3;
int main()
{
//    system("cls");
    // display welcome information
    cout << "\nWelcome to the Employee Pay Center\n\n";
    /*
    Use this section to define your objects.  You will have one object per employee.  You have only three employees.
    The format is your class name and your object name.
    */

    /*
    Here you will prompt for the first employee’s information.
    Prompt the employee name, hours worked, and the hourly wage.  For each …