I'm just beginner in c++ and seek for help. I learn about separate compilation.Try to observe files below:
Poji1.h
#ifndef POJI1_SPEC
#define POJI1_SPEC
class Poji1 {
public:
Poji1();
void ConvToCent(double* temp);
private:
int j;
};
Poji1.cpp
#include %26lt;iostream%26gt;
#include "Poji1.h"
Poji1::Poji1()
{
j=0;
}
void Poji1::ConvToCent(double* temp)
{
int j;
for(j=0; j%26lt;6; j++)
{
*temp++ *=2.54;
}
}
lain.cpp
#include %26lt;iostream.h%26gt;
#include "Poji1.h"
void main()
{
double dblarr[6]={21.0,32.1,43.2,54.3,65.4,76.5...
int j;
Poji1 P;
for (j=0; j%26lt;6; j++)
{
cout%26lt;%26lt;endl%26lt;%26lt;"dblarr["%26lt;%26lt;j%26lt;%26lt;"]="%26lt;%26lt;dblarr...
}
P.ConvToCent(dblarr);
for(j=0; j%26lt;6; j++)
{
cout%26lt;%26lt;endl%26lt;%26lt;"dblarr["%26lt;%26lt;j%26lt;%26lt;"]="%26lt;%26lt;dblarr...
}
}
The errors are:
%26gt;ch -u ./lain.cpp
ERROR: member function '::Poji1()' not defined
at line 8 and ERROR: member function '::ConvToCent()' not defined at line 13 in file C:\Documen. Help!
Separation compilation problem ; C/C++?
need to make your functions public.
Reply:Kai says he's not going to answer that question
Reply:Just two hints. 1. C++ object members are private by default, not public. 2. When you use multiple files look up the extern key word.
I won't say any more, lest this be for a class.
Tuesday, July 14, 2009
Needed clarification in C and C++..?
Can i make the my user defined function as a part of C or C++ library? If so please guide me the procedure..
Can i define my own pre-processor directive and place my user-defined function in that directive?..Please tell me the procedure too..
Thanks..
Needed clarification in C and C++..?
Make a file called abc.h
Put your function in it.
Include abc.h into your source file using the preprocessor directive:- #include "abc.h"
If abc.h is in the same directory as C/C++ source file no need to give path else give path.
Reply:Create a file filename.c that includes your own functions, but without a main() function being defined.
Compile it. An error appears saying "main moudule
missing."
This indicates that .obj file of your C program is created.
Now you can use #include "filename.c" as a header.
See to that your filename.c file is placed in the current directory.
Thank you.
baseball cards
Can i define my own pre-processor directive and place my user-defined function in that directive?..Please tell me the procedure too..
Thanks..
Needed clarification in C and C++..?
Make a file called abc.h
Put your function in it.
Include abc.h into your source file using the preprocessor directive:- #include "abc.h"
If abc.h is in the same directory as C/C++ source file no need to give path else give path.
Reply:Create a file filename.c that includes your own functions, but without a main() function being defined.
Compile it. An error appears saying "main moudule
missing."
This indicates that .obj file of your C program is created.
Now you can use #include "filename.c" as a header.
See to that your filename.c file is placed in the current directory.
Thank you.
baseball cards
Please write a code in c++?
Write a C/C++ program which contain four user define functions mul(), readmat1(), readmat2(),and Display()
readmat1 () function read first matrix (array) from user readmat2 () read second matrix (array) from user
Display() function display these two matrices and mul() multiply the two matrices (arrays) and display the
Resultant Matrix (array).
Write main function and call all these function in it.
Please write a code in c++?
Hi,
Pls check out this link for the complete program and logic
https://www.cs.tcd.ie/Glenn.Strong/CS1/1...
Hope this helps to you..!!!
Saravanan.
readmat1 () function read first matrix (array) from user readmat2 () read second matrix (array) from user
Display() function display these two matrices and mul() multiply the two matrices (arrays) and display the
Resultant Matrix (array).
Write main function and call all these function in it.
Please write a code in c++?
Hi,
Pls check out this link for the complete program and logic
https://www.cs.tcd.ie/Glenn.Strong/CS1/1...
Hope this helps to you..!!!
Saravanan.
How to create librariees in c?
i am told that if i want to use user defined functions of one c program can be used in the other c program, i have to store them in library. i don't know how to create the libraries in the language c. can any one tell me how to create libraries in c?
And also can any one suggest me the best reference book for the language c?
How to create librariees in c?
The best reference book would be "Let us C"
http://www.fallensword.com/?ref=1105967
And also can any one suggest me the best reference book for the language c?
How to create librariees in c?
The best reference book would be "Let us C"
http://www.fallensword.com/?ref=1105967
In C Function - before initializing a char variable, the char contains same junk - why?
With in a C program, I have a local C Function. In this function, I define a local char pointer. Before initializing the char, the char contains same junk value, even if I run millions of times - why?
How come the memory space contains the same junk char value - always?
In C Function - before initializing a char variable, the char contains same junk - why?
I'll give you the general answer. It'll be uninitialized because nothing initialized it to begin with. If it appears to be uninitialized every time you run, it could be the physical address is changing on each run. Now in your case, it sounds like you're looking at the same physical address each time, overwriting it, and re-running to see the data you overwrote. Either the overwrite failed, or between runs perhaps something else used the space. Your debugger can verify the overwrite if you dump the address space contents before leaving your program. As far as what uses that space after, there are software tools that let you watch writes to an address, but as you can imagine they're very intrusive and may end up changing the behavior you're seeing.
Reply:That's the way C language operates. Before initialization, your variable contains unexpected data.
This is a source of many bugs actually. Other programming languages might prohibit you from using unassigned variables (such as C Sharp)
Hope this helps.
Reply:Ok, as you know a local variable's value is stored on the stack--and you're asking why the uninitialized value of a local character variable doesn't return random data. The simple fact is that you are initializing values on the stack and then re-using them when you call the the function and examine the value of the local variable. As suggested in another answer, you can prove all this to yourself using a debugger. I like gdb that comes with gnu-c. Examine your stack and addresses that your local variables point to, etc. The debugger is an excellent way for you learn C and all of its nuances.
Good Luck
How come the memory space contains the same junk char value - always?
In C Function - before initializing a char variable, the char contains same junk - why?
I'll give you the general answer. It'll be uninitialized because nothing initialized it to begin with. If it appears to be uninitialized every time you run, it could be the physical address is changing on each run. Now in your case, it sounds like you're looking at the same physical address each time, overwriting it, and re-running to see the data you overwrote. Either the overwrite failed, or between runs perhaps something else used the space. Your debugger can verify the overwrite if you dump the address space contents before leaving your program. As far as what uses that space after, there are software tools that let you watch writes to an address, but as you can imagine they're very intrusive and may end up changing the behavior you're seeing.
Reply:That's the way C language operates. Before initialization, your variable contains unexpected data.
This is a source of many bugs actually. Other programming languages might prohibit you from using unassigned variables (such as C Sharp)
Hope this helps.
Reply:Ok, as you know a local variable's value is stored on the stack--and you're asking why the uninitialized value of a local character variable doesn't return random data. The simple fact is that you are initializing values on the stack and then re-using them when you call the the function and examine the value of the local variable. As suggested in another answer, you can prove all this to yourself using a debugger. I like gdb that comes with gnu-c. Examine your stack and addresses that your local variables point to, etc. The debugger is an excellent way for you learn C and all of its nuances.
Good Luck
How to write an exponetial equation in C code/language?
i am trying to define the following funtion in C code could some please tell me the exact syntax on how to declare this
f(x) = e^(-x^2)
this is how someone told me to do it but it doesnt work
#include(math.h)
y= exp(-x,2)
How to write an exponetial equation in C code/language?
the function is
pow(base, exponent);
and you DO have to include math.h
First define e
const float e = 2.78; //proabably want to be more exact
int x;
x = 10;
pow(e, pow(x, 2)); //This caluculates e to the value of x (which is 10) squared.
Reply:exp(pow(-x,2));
artificial flowers
f(x) = e^(-x^2)
this is how someone told me to do it but it doesnt work
#include(math.h)
y= exp(-x,2)
How to write an exponetial equation in C code/language?
the function is
pow(base, exponent);
and you DO have to include math.h
First define e
const float e = 2.78; //proabably want to be more exact
int x;
x = 10;
pow(e, pow(x, 2)); //This caluculates e to the value of x (which is 10) squared.
Reply:exp(pow(-x,2));
artificial flowers
These are all true/false questions for C programming?
1. The preprocessor directive #define RING 1 tells the C preprocessor to replace each occurrence of the constant RING with 1.
2. The fourth element of an array named bob is bob[4]
3. All arrays with 10 elements require the same amount of memory.
4. A function with return type void always returns the value 0.
5. A function prototype tells the compiler nothing about the value that is returned by the function.
6. When an array is passed to a function, the address of the array is passed to the function and a copy of the elements is made for the function to manipulate.
These are all true/false questions for C programming?
Good luck doing your own homework!
(And neither of the two answerers below is 100% right, btw.)
Reply:1). true
2). false
3). true
4). false
5). true
6). false.
Ok now you won't learn anything from these true/false answers...
Reply:Why can't you do your own homework?
Reply:1 t
2 f
3 t
4 t
5 f
6 t
2. The fourth element of an array named bob is bob[4]
3. All arrays with 10 elements require the same amount of memory.
4. A function with return type void always returns the value 0.
5. A function prototype tells the compiler nothing about the value that is returned by the function.
6. When an array is passed to a function, the address of the array is passed to the function and a copy of the elements is made for the function to manipulate.
These are all true/false questions for C programming?
Good luck doing your own homework!
(And neither of the two answerers below is 100% right, btw.)
Reply:1). true
2). false
3). true
4). false
5). true
6). false.
Ok now you won't learn anything from these true/false answers...
Reply:Why can't you do your own homework?
Reply:1 t
2 f
3 t
4 t
5 f
6 t
Is the main function in C language is user defined or predefined. Can any one explain.?
The contents of the main function are for sure user defined.
The signature of the same however is predefined
It can only be on of these two in C
main();
main(int argc, char *argv[]);
The return type of main is subject to a lot of arguments.
In C++, the return type has to be "int"
If I am not wrong, there is no such requirement in C, this mean you can get away with both int and void
I was once told that you should be able to get away with other types as well, but that I have never tried out for myself, so I cant vouch for it. I guess that may be compiler dependent.
So to conclude, these are allowed
int main()
void main()
int main(int argc, char *argv[])
void main(int argc, char *argv[])
Hope this helps
Is the main function in C language is user defined or predefined. Can any one explain.?
main () is just like any other function.
You can write it any way you like, and call it any time you want. There is absolutely nothing "predefined" about it in any way.
Those, who say, arguments are fixed are wrong to.
You can have
main() or main (int) or main (int,char**) or main (int, void*) or main (int,void**,float,double) - whatever you make it. And it can return anything you want too, or nothing at all.
The only special thing about main is that the progam loader, looks for a function with this name when you start a program, and calls it passing the number of command line arguments as the first parameter, and an array of their values as the next,
and when the program exists, the value main() returned is converted to int, and returned to the OS as the program's exit status.
Reply:usually predefined
although,a user change option is offered
for more help,i would reference:
http://www.techrepublic.com
free logon and search available
Reply:The main function is the entry point. The main function is the first USER written function when your program is executed. Some system code usually runs before the main function executes. I've had a program choke before the main function because I gave it the wrong flags during compile time which was proof that some system code actually ran before the main function.
The signature of the same however is predefined
It can only be on of these two in C
main();
main(int argc, char *argv[]);
The return type of main is subject to a lot of arguments.
In C++, the return type has to be "int"
If I am not wrong, there is no such requirement in C, this mean you can get away with both int and void
I was once told that you should be able to get away with other types as well, but that I have never tried out for myself, so I cant vouch for it. I guess that may be compiler dependent.
So to conclude, these are allowed
int main()
void main()
int main(int argc, char *argv[])
void main(int argc, char *argv[])
Hope this helps
Is the main function in C language is user defined or predefined. Can any one explain.?
main () is just like any other function.
You can write it any way you like, and call it any time you want. There is absolutely nothing "predefined" about it in any way.
Those, who say, arguments are fixed are wrong to.
You can have
main() or main (int) or main (int,char**) or main (int, void*) or main (int,void**,float,double) - whatever you make it. And it can return anything you want too, or nothing at all.
The only special thing about main is that the progam loader, looks for a function with this name when you start a program, and calls it passing the number of command line arguments as the first parameter, and an array of their values as the next,
and when the program exists, the value main() returned is converted to int, and returned to the OS as the program's exit status.
Reply:usually predefined
although,a user change option is offered
for more help,i would reference:
http://www.techrepublic.com
free logon and search available
Reply:The main function is the entry point. The main function is the first USER written function when your program is executed. Some system code usually runs before the main function executes. I've had a program choke before the main function because I gave it the wrong flags during compile time which was proof that some system code actually ran before the main function.
How to use string inside a user define class?
I need help using string inside a user define class.. this is for C++...
this is basically the question.. the class should have 3 private method: name(which is a string), cost (integer), quantity(integer);
i then need to make accessor modulator prototype... etc but my basic problem is passing the string n yes i did used #include%26lt;string%26gt;
How to use string inside a user define class?
Your question is incomplete, and I don't think you'll get a lot of helpful answers this way. What do you mean "passing the string n"? Data doesn't get passed to classes very obviously, it gets passed to member functions, though.
Reply:To make this class derive from string, use : private string after the class name.
To include a string as a private data member, use it after a private: label.
To access this data member, use *this-%26gt;name or just name from a member. Only friends can access name directly. You will need to provide wrapper functions for modifying and getting name from inside the class using public (for via objects) and protected (for via derived classes).
PS to Angus, n in this sentence is used as "and".
this is basically the question.. the class should have 3 private method: name(which is a string), cost (integer), quantity(integer);
i then need to make accessor modulator prototype... etc but my basic problem is passing the string n yes i did used #include%26lt;string%26gt;
How to use string inside a user define class?
Your question is incomplete, and I don't think you'll get a lot of helpful answers this way. What do you mean "passing the string n"? Data doesn't get passed to classes very obviously, it gets passed to member functions, though.
Reply:To make this class derive from string, use : private string after the class name.
To include a string as a private data member, use it after a private: label.
To access this data member, use *this-%26gt;name or just name from a member. Only friends can access name directly. You will need to provide wrapper functions for modifying and getting name from inside the class using public (for via objects) and protected (for via derived classes).
PS to Angus, n in this sentence is used as "and".
I need homework help for calc. I need to create a function that as x approaches point c from left to right?
they are equal. Point c also must be defined, but the function cannot be continuous at point c.
I have really now idea how to do this! Does any have an example?
I need homework help for calc. I need to create a function that as x approaches point c from left to right?
What are the requirements for continuity of a function f(x) at x=c? They are:
f is defined at c,
the (two-sided) limit lim (x-%26gt;c) f(x) exists, and
lim(x-%26gt;c) f(x) = f(c)
Well, you're given that the first two hold. So...
Reply:If the function as x approaches c from both left and right approaches the same value, and f(c) is defined, then f is continuous at c, isn't it? But it might not be differentiable if there's a sharp corner at (c,f(c)). The absolute value function gives you that. f(x) = |x-2| is continuous at x = 2, and f(2) is 0, well defined, but it's not differentiable because of the corner.
Unless you mean a piecewise defined function. Something like f(x) = (x²-4)/(x-2) approaches a value of 4 at x=2, but there's a HOLE there, since f(x) is not defined for x=2. But if you separately define f(2), you can make it anything you want. If you make it 4, you've got a removable discontinuity.
On the other hand, something like f(x) = 1/x² can have f(0) = 1 added as a piecewise definition, but since f(x) gets very very large as x→0, there's not a limit, no approaching a single value, and hence no continuity.
800flowers.com
I have really now idea how to do this! Does any have an example?
I need homework help for calc. I need to create a function that as x approaches point c from left to right?
What are the requirements for continuity of a function f(x) at x=c? They are:
f is defined at c,
the (two-sided) limit lim (x-%26gt;c) f(x) exists, and
lim(x-%26gt;c) f(x) = f(c)
Well, you're given that the first two hold. So...
Reply:If the function as x approaches c from both left and right approaches the same value, and f(c) is defined, then f is continuous at c, isn't it? But it might not be differentiable if there's a sharp corner at (c,f(c)). The absolute value function gives you that. f(x) = |x-2| is continuous at x = 2, and f(2) is 0, well defined, but it's not differentiable because of the corner.
Unless you mean a piecewise defined function. Something like f(x) = (x²-4)/(x-2) approaches a value of 4 at x=2, but there's a HOLE there, since f(x) is not defined for x=2. But if you separately define f(2), you can make it anything you want. If you make it 4, you've got a removable discontinuity.
On the other hand, something like f(x) = 1/x² can have f(0) = 1 added as a piecewise definition, but since f(x) gets very very large as x→0, there's not a limit, no approaching a single value, and hence no continuity.
800flowers.com
How can I create table in SQL Server 2000 at runtime using C#??????
I want to create table in SQL Server 2000 as the page load using C# with proper attributes defined in the table while creating table.
Please suggest me if any one knows the answer.
How can I create table in SQL Server 2000 at runtime using C#??????
Look at the System.Data.SqlClient namespace.
SqlConnection connection = new SqlConnection(connectionString)
SqlCommand command = new SqlCommand()
command.CommandText = "CREATE TABLE foo (Col1 int not null)
command.Connection = connection;
command.ExecuteNonQuery()
There are also the ADO.NET calls if you don't like writing all the SQL queries. VS 2005 also comes with the Microsoft.SqlServer.Management.Smo assemblies and namespace which can do this too.
Please suggest me if any one knows the answer.
How can I create table in SQL Server 2000 at runtime using C#??????
Look at the System.Data.SqlClient namespace.
SqlConnection connection = new SqlConnection(connectionString)
SqlCommand command = new SqlCommand()
command.CommandText = "CREATE TABLE foo (Col1 int not null)
command.Connection = connection;
command.ExecuteNonQuery()
There are also the ADO.NET calls if you don't like writing all the SQL queries. VS 2005 also comes with the Microsoft.SqlServer.Management.Smo assemblies and namespace which can do this too.
Determine the value of the constant c that makes this piecewise-defined function continuous:?
|x| / (x^2 -x) when x%26lt;0
2e^x + c when x %26gt; or equal to 0
Determine the value of the constant c that makes this piecewise-defined function continuous:?
c = 3/2...on the left you really have -x/[x(x-2)]= -1/[x-2] which tends to 1/2 as x tends to 0...on the right ,as tends to 0 , is 2 + c
2e^x + c when x %26gt; or equal to 0
Determine the value of the constant c that makes this piecewise-defined function continuous:?
c = 3/2...on the left you really have -x/[x(x-2)]= -1/[x-2] which tends to 1/2 as x tends to 0...on the right ,as tends to 0 , is 2 + c
Why does Visual C++ change the value of my variable?
I'm a beginner in C++, and I've defined a double variable (exh) as 100.0015. But when I run the program, the number changes to 100.0014999... what is going on?
Why does Visual C++ change the value of my variable?
because floating point numbers are defined in computer logic as
NUMBER * 2^X, where X and number are stored in the computer, this leaves a little inaccuracy, because not every number in base 10 can be represented this way. Which leads to the first rule of programming:
Never compare floating point numbers for equality.
Instead compare them for "close enough"-ness. Such as:
float a,b,c;
if((a - b) %26lt; .000001)
{
cout %26lt;%26lt; "Number's are \"equal\""
}
Reply:Not all decimal floating numbers can be represented exactly the same in binary floating point format. It's the same number or as close as you are going to get, 100.0014999~. This is why you should always use format specifiers when printing out floating point numbers. A format specifier says how many digits to the left and/or right of the decimal point that you wish to print out, and will round the number properly.
Why does Visual C++ change the value of my variable?
because floating point numbers are defined in computer logic as
NUMBER * 2^X, where X and number are stored in the computer, this leaves a little inaccuracy, because not every number in base 10 can be represented this way. Which leads to the first rule of programming:
Never compare floating point numbers for equality.
Instead compare them for "close enough"-ness. Such as:
float a,b,c;
if((a - b) %26lt; .000001)
{
cout %26lt;%26lt; "Number's are \"equal\""
}
Reply:Not all decimal floating numbers can be represented exactly the same in binary floating point format. It's the same number or as close as you are going to get, 100.0014999~. This is why you should always use format specifiers when printing out floating point numbers. A format specifier says how many digits to the left and/or right of the decimal point that you wish to print out, and will round the number properly.
Do you think that you always have to “Define the relationship” in your relationship with your partner?
1. D'u thnk that u alws have to “Define the relationship” in ur relationship with your partner?
a.Yes. I think that I always have to do that.
b.No. As long as I am happy with the relationship. Why do I have to?
2. Assume tht u r in a relationship. What would u feel if u'r partner asks u to define the relationship with her of him?
a.Ok. I am going to figure out
b.Oh, I am in trouble
3. When is the moment for u to ask u'r partner “Define the relationship”?
a. When you want to start the serious relationship with him or her (I like you more than before so I want to confirm our relationship.)
b. When you want to finish the relationship with him or her(I am not satisfied with you anymore so it is time for us to define that we are over.)
c. There is no such moment for that
4. Do you agree with “Women are more likely to want to define the relationship than Men are”?
a.Yes
b.No
c.No idea
5. What is your sex?
a.Male
b.Female.
c.I do not want to reply.
Do you think that you always have to “Define the relationship” in your relationship with your partner?
1. a
2. a
3. a
4. b
5. b
Reply:I want to go off with this survey.
I never think of it as "defining" as more like "clarifying", making sure my partner understands what i want from the relationship, what i will give for the relationship and areas that misdefine the relationship.
To wit, if my partner feels the only way I can show love for her is to buy lots of jewelry, that misdefines the realtionship
Reply:Women always want to define a relationship. I cannot speak for men. For us, this means we want to know that we are a girlfriend, etc. Couples should feel comfortable enough to talk about where they are at, otherwise they shouldn't be a couple.
Mostly, we are looking for answers to questions like monogamy, priorities, etc.
Hope this helps!
wildflower
a.Yes. I think that I always have to do that.
b.No. As long as I am happy with the relationship. Why do I have to?
2. Assume tht u r in a relationship. What would u feel if u'r partner asks u to define the relationship with her of him?
a.Ok. I am going to figure out
b.Oh, I am in trouble
3. When is the moment for u to ask u'r partner “Define the relationship”?
a. When you want to start the serious relationship with him or her (I like you more than before so I want to confirm our relationship.)
b. When you want to finish the relationship with him or her(I am not satisfied with you anymore so it is time for us to define that we are over.)
c. There is no such moment for that
4. Do you agree with “Women are more likely to want to define the relationship than Men are”?
a.Yes
b.No
c.No idea
5. What is your sex?
a.Male
b.Female.
c.I do not want to reply.
Do you think that you always have to “Define the relationship” in your relationship with your partner?
1. a
2. a
3. a
4. b
5. b
Reply:I want to go off with this survey.
I never think of it as "defining" as more like "clarifying", making sure my partner understands what i want from the relationship, what i will give for the relationship and areas that misdefine the relationship.
To wit, if my partner feels the only way I can show love for her is to buy lots of jewelry, that misdefines the realtionship
Reply:Women always want to define a relationship. I cannot speak for men. For us, this means we want to know that we are a girlfriend, etc. Couples should feel comfortable enough to talk about where they are at, otherwise they shouldn't be a couple.
Mostly, we are looking for answers to questions like monogamy, priorities, etc.
Hope this helps!
wildflower
Do structures in C always have to be defined globally?
Can you define a structure in a function or do you have to put it up above the main()?
Do structures in C always have to be defined globally?
structs are variables and, consequently, can be defined anywhere in a program.
It is, generally, bad practice to use global variables in C - I would stay away from even thinking about them.
Use $DEFINE macros for any global values.
Reply:You can declare a structure in a local scope. It would have been faster to test it than to ask here. Or better yet, look up a C reference.
Reply:Well, you can always try it and find out for yourself. :)
I don't think it will make any difference, as long as you define a structure BEFORE using it.
Structure definitions are for the compiler's sake, not your program's. However, variables can be defined locally or globally and their placement makes a lot of difference to how the variables are compiled.
Type definitions can also be put anywhere, as long as you define them before you use them.
Remember that you have to ALLOCATE the structure, and wherever you allocate it, it will affect the program code just like with other variables.
Reply:While this would be a easy question to answer...simply declare a struct inside int main or main (not sure of the syntax on C) and see if it would compile correctly...I believe the question would be WHY you would want to, think about it...why are you using your struct statement, if you put inside a main function wouldn't you have to actually pass the struct as an argument EACH time you wanted to use it inside a new function?
Do structures in C always have to be defined globally?
structs are variables and, consequently, can be defined anywhere in a program.
It is, generally, bad practice to use global variables in C - I would stay away from even thinking about them.
Use $DEFINE macros for any global values.
Reply:You can declare a structure in a local scope. It would have been faster to test it than to ask here. Or better yet, look up a C reference.
Reply:Well, you can always try it and find out for yourself. :)
I don't think it will make any difference, as long as you define a structure BEFORE using it.
Structure definitions are for the compiler's sake, not your program's. However, variables can be defined locally or globally and their placement makes a lot of difference to how the variables are compiled.
Type definitions can also be put anywhere, as long as you define them before you use them.
Remember that you have to ALLOCATE the structure, and wherever you allocate it, it will affect the program code just like with other variables.
Reply:While this would be a easy question to answer...simply declare a struct inside int main or main (not sure of the syntax on C) and see if it would compile correctly...I believe the question would be WHY you would want to, think about it...why are you using your struct statement, if you put inside a main function wouldn't you have to actually pass the struct as an argument EACH time you wanted to use it inside a new function?
Plz tell me how to make a user defined libraries in c programming??
In C, you can create two types of libraries: static or shared.
Static libraries are those which the compiler will bind at compile time while shared (or dynamic) libraries may also be linked at runtime.
With shared libraries, you can have multiple C programms running using the same library once thus reducing memory usage (this is the concept of DLLs under Windows and .a under unix/linux.
Have a look at this great online tutorial that brings you into the deeps of this matter:
http://users.actcom.co.il/~choo/lupg/tut...
Plz tell me how to make a user defined libraries in c programming??
just u make a header file by adding extention as .h
eg(filename.h) and insert the code what ever u wanted and then include the file in ur source program
like
#inlcude "userdefined.h"
it is a good practice only to place the small functions in the header files
a set of header files termed as library
hope it would help u if not cantact me
intmainvoid.c@gmail.com
bye
Static libraries are those which the compiler will bind at compile time while shared (or dynamic) libraries may also be linked at runtime.
With shared libraries, you can have multiple C programms running using the same library once thus reducing memory usage (this is the concept of DLLs under Windows and .a under unix/linux.
Have a look at this great online tutorial that brings you into the deeps of this matter:
http://users.actcom.co.il/~choo/lupg/tut...
Plz tell me how to make a user defined libraries in c programming??
just u make a header file by adding extention as .h
eg(filename.h) and insert the code what ever u wanted and then include the file in ur source program
like
#inlcude "userdefined.h"
it is a good practice only to place the small functions in the header files
a set of header files termed as library
hope it would help u if not cantact me
intmainvoid.c@gmail.com
bye
I'm having trouble in running the user defined function in C programming?
I can printf for 0 to 9 but not %26gt; 9
#include %26lt;stdio.h%26gt;
#include %26lt;stdlib.h%26gt;
#include %26lt;math.h%26gt;
int main(void)
{ int input, sum=0, product=1;
void spdigit(int, int*, int*);
printf("If number = ");
scanf("%d", %26amp;input);
spdigit(input, %26amp;sum, %26amp;product);
printf("SDIGIT = %d\n", sum);
printf("PDIGIT = %d\n", product);
return 0;
}
void spdigit(int input3f, int *sumf, int *productf)
{ int noofdigits, counter=0, i;
do
{counter++;
noofdigits = input3f/10;
} while ( noofdigits != 0 );
int remainder1[counter], remainder2[counter];
remainder1[0] = input3f%10;
remainder2[0] = remainder1[0];
for ( i=1; i%26lt;counter; i++ )
{ remainder1[i] = input3f%(10*i);
remainder2[i] = remainder1[i]; }
*sumf+=remainder1[0];
*productf*=remainder1[0];
for ( i=1; i%26lt;counter; i++ )
{ remainder2[i]-= remainder1[i-1];
remainder2[i]/= 10*i;
*sumf+=remainder2[i];
*productf*=remainder2[i]; }
}
I'm having trouble in running the user defined function in C programming?
The corrected %26amp; tested (for several times) code is--------------------------------------...
#include %26lt;stdio.h%26gt;
#include %26lt;stdlib.h%26gt;
#include %26lt;math.h%26gt;
void spdigit(int input3f, int *sumf, int *productf)
{
int noofdigits,b=1,counter=0, i=input3f;
int *rem1;
do
{
counter++;
noofdigits = i/10;
i=i/10;
}
while ( noofdigits != 0 );
i=0;
rem1=(int *)malloc(sizeof(int)*counter);
*(rem1+0) = input3f%10;
b=input3f;
for (i=1; i%26lt;counter; i++ )
{
b=b/10;
*(rem1+i)=b%10;
printf("\n%d",*(rem1+1));
}
*sumf+=*(rem1+0);
*productf*=*(rem1+0);
for ( i=1; i%26lt;counter; i++ )
{
*sumf+=*(rem1+i);
*productf*=*(rem1+i);
}
}
Corrections are:-%26gt;
1. you can use malloc for dynamic memory allocation.
2. It is not necessary to use remainder2
instead I have used variable b whose value is inpower of 10 %26amp; which divides the total value each time by 10 so that eliminiting last digit. All Digits are stored in array pointed by rem1.
Thank you.
Mandar Gurav
Walchand College of Engineering,
Sangli,
Maharashtra,
India.
Reply:All of your printf function calls look good, so my guess is that the problem is in the spdigit function. Use a debugger to make sure that spdigit is doing what you want/expect/need it to do.
You could try this to test your printf for multi-digit output if you really want to:
int x = 1234;
printf("%d\n", x);
Reply:Your do while loop is faulty
#include %26lt;stdio.h%26gt;
#include %26lt;stdlib.h%26gt;
#include %26lt;math.h%26gt;
int main(void)
{ int input, sum=0, product=1;
void spdigit(int, int*, int*);
printf("If number = ");
scanf("%d", %26amp;input);
spdigit(input, %26amp;sum, %26amp;product);
printf("SDIGIT = %d\n", sum);
printf("PDIGIT = %d\n", product);
return 0;
}
void spdigit(int input3f, int *sumf, int *productf)
{ int noofdigits, counter=0, i;
do
{counter++;
noofdigits = input3f/10;
} while ( noofdigits != 0 );
int remainder1[counter], remainder2[counter];
remainder1[0] = input3f%10;
remainder2[0] = remainder1[0];
for ( i=1; i%26lt;counter; i++ )
{ remainder1[i] = input3f%(10*i);
remainder2[i] = remainder1[i]; }
*sumf+=remainder1[0];
*productf*=remainder1[0];
for ( i=1; i%26lt;counter; i++ )
{ remainder2[i]-= remainder1[i-1];
remainder2[i]/= 10*i;
*sumf+=remainder2[i];
*productf*=remainder2[i]; }
}
I'm having trouble in running the user defined function in C programming?
The corrected %26amp; tested (for several times) code is--------------------------------------...
#include %26lt;stdio.h%26gt;
#include %26lt;stdlib.h%26gt;
#include %26lt;math.h%26gt;
void spdigit(int input3f, int *sumf, int *productf)
{
int noofdigits,b=1,counter=0, i=input3f;
int *rem1;
do
{
counter++;
noofdigits = i/10;
i=i/10;
}
while ( noofdigits != 0 );
i=0;
rem1=(int *)malloc(sizeof(int)*counter);
*(rem1+0) = input3f%10;
b=input3f;
for (i=1; i%26lt;counter; i++ )
{
b=b/10;
*(rem1+i)=b%10;
printf("\n%d",*(rem1+1));
}
*sumf+=*(rem1+0);
*productf*=*(rem1+0);
for ( i=1; i%26lt;counter; i++ )
{
*sumf+=*(rem1+i);
*productf*=*(rem1+i);
}
}
Corrections are:-%26gt;
1. you can use malloc for dynamic memory allocation.
2. It is not necessary to use remainder2
instead I have used variable b whose value is inpower of 10 %26amp; which divides the total value each time by 10 so that eliminiting last digit. All Digits are stored in array pointed by rem1.
Thank you.
Mandar Gurav
Walchand College of Engineering,
Sangli,
Maharashtra,
India.
Reply:All of your printf function calls look good, so my guess is that the problem is in the spdigit function. Use a debugger to make sure that spdigit is doing what you want/expect/need it to do.
You could try this to test your printf for multi-digit output if you really want to:
int x = 1234;
printf("%d\n", x);
Reply:Your do while loop is faulty
Difference between library functions and user defined functions in c language?
Does the phrase "user defined" mean anything to you?
.
Difference between library functions and user defined functions in c language?
A user defined function is something you the programmer has defined to perform a specific action or calculation in your program.
Example, you need to calculate somebody's age to the nearest minute. You create a calculateAge function:
double calculateAge(Date dateOfBirth)
{
}
So it is specific to your needs at this time.
A library function has been written by someone else, and is reusuable by many programmers to solve the same problem over and over.
Example: strcpy in C. If you are using C, you will never need to write functions for string manipulation because somebody else did that a long time ago...
tarot cards
.
Difference between library functions and user defined functions in c language?
A user defined function is something you the programmer has defined to perform a specific action or calculation in your program.
Example, you need to calculate somebody's age to the nearest minute. You create a calculateAge function:
double calculateAge(Date dateOfBirth)
{
}
So it is specific to your needs at this time.
A library function has been written by someone else, and is reusuable by many programmers to solve the same problem over and over.
Example: strcpy in C. If you are using C, you will never need to write functions for string manipulation because somebody else did that a long time ago...
tarot cards
Let f be an analytic function defined on the unit disc D={z in C:mod(z)<1}.if mod(f(z))</=1-mod(z) for each
let f be an analytic function defined on the unit disc D={z in C:mod(z)%26lt;1}.if mod(f(z))%26lt;/=1-mod(z) for each z in D,show that f is the zero function on D
Let f be an analytic function defined on the unit disc D={z in C:mod(z)%26lt;1}.if mod(f(z))%26lt;/=1-mod(z) for each
Fix z in D. By the maximum modulus theorem for analytic functions, for r with |z| %26lt; r %26lt; 1, |f| either has no local maximum in { w : |w| %26lt; r } or is constant on that domain. Thus
|f(z)| =%26lt; sup { |f(w)| : w in C with |w| = r } =%26lt; 1 - r.
Since the r chosen was arbitrary, it follows that |f(z)| = 0, from which we deduce that f is zero on D.
Let f be an analytic function defined on the unit disc D={z in C:mod(z)%26lt;1}.if mod(f(z))%26lt;/=1-mod(z) for each
Fix z in D. By the maximum modulus theorem for analytic functions, for r with |z| %26lt; r %26lt; 1, |f| either has no local maximum in { w : |w| %26lt; r } or is constant on that domain. Thus
|f(z)| =%26lt; sup { |f(w)| : w in C with |w| = r } =%26lt; 1 - r.
Since the r chosen was arbitrary, it follows that |f(z)| = 0, from which we deduce that f is zero on D.
Compile errors in my header file? why? c++?
before in my header file i had this:
File Edit Options Buffers Tools C++ Help
#ifndef SWAP_H
#define SWAP_H
//#include %26lt;string%26gt;
//#include %26lt;iostream%26gt;
using namespace std;
void swap (string %26amp;, string %26amp;);
#endif
-------
that gave me these compile errors:
Swap.h:7: error: `string' was not declared in this scope
Swap.h:7: error: parse error before `,' token
------
now i have:
#ifndef SWAP_H
#define SWAP_H
//#include %26lt;string%26gt;
//#include %26lt;iostream%26gt;
using namespace std;
std::void swap (string %26amp;, string %26amp;);
#endif
------
Swap.h:7: error: `string' was not declared in this scope
Swap.h:7: error: parse error before `,' token
---
ALL this happens when i try to compile my Swap.cpp file.. help? wats wrong?
Compile errors in my header file? why? c++?
The compiler doesn't know what a "string" is.
uncomment the #include %26lt;string%26gt; and add
using std::string;
File Edit Options Buffers Tools C++ Help
#ifndef SWAP_H
#define SWAP_H
//#include %26lt;string%26gt;
//#include %26lt;iostream%26gt;
using namespace std;
void swap (string %26amp;, string %26amp;);
#endif
-------
that gave me these compile errors:
Swap.h:7: error: `string' was not declared in this scope
Swap.h:7: error: parse error before `,' token
------
now i have:
#ifndef SWAP_H
#define SWAP_H
//#include %26lt;string%26gt;
//#include %26lt;iostream%26gt;
using namespace std;
std::void swap (string %26amp;, string %26amp;);
#endif
------
Swap.h:7: error: `string' was not declared in this scope
Swap.h:7: error: parse error before `,' token
---
ALL this happens when i try to compile my Swap.cpp file.. help? wats wrong?
Compile errors in my header file? why? c++?
The compiler doesn't know what a "string" is.
uncomment the #include %26lt;string%26gt; and add
using std::string;
If Christ was not defined until 325 C.E., then who are the first Christian Romans worshiping?
Both the description of Jesus of Nazareth as the Messiah (Greek "Christ") and the use of the term "Christians" to describe his followers are much earlier than that.
What happened in 325 CE was that a Roman Emperor, having decided (purportedly on the basis of a mystical vision) to align himself with Christianity, summoned an ecumenical council (that is, one of all the Christian leadership) in the belief that his administrative talents would be helpful in sorting out a major controversy over doctrine.
It didn't work out that way. Partly because a lengthy series of Emperors wavered between the two major factions, nothing was resolved for over half a century. The so-called "Nicene Creed" got its name from the faction that scored a victory at that first council, but didn't take its final form until a later one and contains at least one direct contradiction of the creed adopted in 325 at Nicaea.
Christ was certainly worshipped as God and as the Son of God earlier. The problem was that there were different opinions as to exactly what that meant. The fight arose because the subordinationists (who regarded Jesus as some sort of lesser God) included a priest name Arius whose poetry became (a) too explicit about the subordinationist view, and (b) too publicly popular to ignore.
The notion that the Emperor (Constantine) was, for the first time in Christian history, available to pick a side and enforce its views, raised the stakes and eventually led to a considerable calcification of Christian theology over the exact status of Jesus.
In the meantime, Trinitarian theology had undergone extensive development, partly because the whole problem is not explainable in simple terms. We had God roaming around teaching people to pray to someone else he called God, or actually "Daddy" (a better translation than "Father" for the informal word he used).
If Christ was not defined until 325 C.E., then who are the first Christian Romans worshiping?
The same being the Mormons worship today, God the Father. And they had a correct understanding of who Christ was in relation to both God and humans, just as the Mormons do today.
Mormons do not use the Council of Nicea as the basis for their theology. The use direct revelation from God.
Reply:Jesus Christ. Making an official definition doesn't mean the concept didn't exist before that. The definition was a move by the Church to make a statement, in the face of heretical doctrine that was going around. That concept had always been there, but not written down in a clear form. %26lt;*)))%26gt;%26lt;
Reply:Historically, Jesus lived from approximately 4BC to 28AD (give or take 3 or 4 years). The church arose immediately after his death and resurrection. The New Testament was written over the next 60 years or so. So the first Christians were obviously worshipping Jesus. The 325AD event you refer to wasn't the beginning of the whole concept of Christ; it was a formal declaration of the fundamentals of the Christian faith, meant to weed out many of the doctrinal errors that were creeping into the church.
Reply:"Defined?"
LOL
circa 32 C.E.:
Matthew 16
15 He saith unto them, But whom say ye that I am?
16 And Simon Peter answered and said, Thou art the Christ, the Son of the living God.
17 And Jesus answered and said unto him, Blessed art thou, Simon Barjona: for flesh and blood hath not revealed it unto thee, but my Father which is in heaven.
The Anointed One is defined as Jesus.
Messiah is referred to as far back as Daniel 9, about 550 B.C.E.
Reply:Who were the first Christian Jews worshipping? Peter was a Jew just like Christ. There are so many stories out to discredit the Lord.
The deceiver is deceiving greatly. Be not deceived. Know the Word of God, the Holy Bible.
Reply:Interesting. The Council of Nicaea...now you're going to force me to read that whole thing.
http://www.netzarim.co.il/Museum/Sukkah0...
Reply:It was just God then, and he had a temper.
After he had Jesus, he mellowed out.
What happened in 325 CE was that a Roman Emperor, having decided (purportedly on the basis of a mystical vision) to align himself with Christianity, summoned an ecumenical council (that is, one of all the Christian leadership) in the belief that his administrative talents would be helpful in sorting out a major controversy over doctrine.
It didn't work out that way. Partly because a lengthy series of Emperors wavered between the two major factions, nothing was resolved for over half a century. The so-called "Nicene Creed" got its name from the faction that scored a victory at that first council, but didn't take its final form until a later one and contains at least one direct contradiction of the creed adopted in 325 at Nicaea.
Christ was certainly worshipped as God and as the Son of God earlier. The problem was that there were different opinions as to exactly what that meant. The fight arose because the subordinationists (who regarded Jesus as some sort of lesser God) included a priest name Arius whose poetry became (a) too explicit about the subordinationist view, and (b) too publicly popular to ignore.
The notion that the Emperor (Constantine) was, for the first time in Christian history, available to pick a side and enforce its views, raised the stakes and eventually led to a considerable calcification of Christian theology over the exact status of Jesus.
In the meantime, Trinitarian theology had undergone extensive development, partly because the whole problem is not explainable in simple terms. We had God roaming around teaching people to pray to someone else he called God, or actually "Daddy" (a better translation than "Father" for the informal word he used).
If Christ was not defined until 325 C.E., then who are the first Christian Romans worshiping?
The same being the Mormons worship today, God the Father. And they had a correct understanding of who Christ was in relation to both God and humans, just as the Mormons do today.
Mormons do not use the Council of Nicea as the basis for their theology. The use direct revelation from God.
Reply:Jesus Christ. Making an official definition doesn't mean the concept didn't exist before that. The definition was a move by the Church to make a statement, in the face of heretical doctrine that was going around. That concept had always been there, but not written down in a clear form. %26lt;*)))%26gt;%26lt;
Reply:Historically, Jesus lived from approximately 4BC to 28AD (give or take 3 or 4 years). The church arose immediately after his death and resurrection. The New Testament was written over the next 60 years or so. So the first Christians were obviously worshipping Jesus. The 325AD event you refer to wasn't the beginning of the whole concept of Christ; it was a formal declaration of the fundamentals of the Christian faith, meant to weed out many of the doctrinal errors that were creeping into the church.
Reply:"Defined?"
LOL
circa 32 C.E.:
Matthew 16
15 He saith unto them, But whom say ye that I am?
16 And Simon Peter answered and said, Thou art the Christ, the Son of the living God.
17 And Jesus answered and said unto him, Blessed art thou, Simon Barjona: for flesh and blood hath not revealed it unto thee, but my Father which is in heaven.
The Anointed One is defined as Jesus.
Messiah is referred to as far back as Daniel 9, about 550 B.C.E.
Reply:Who were the first Christian Jews worshipping? Peter was a Jew just like Christ. There are so many stories out to discredit the Lord.
The deceiver is deceiving greatly. Be not deceived. Know the Word of God, the Holy Bible.
Reply:Interesting. The Council of Nicaea...now you're going to force me to read that whole thing.
http://www.netzarim.co.il/Museum/Sukkah0...
Reply:It was just God then, and he had a temper.
After he had Jesus, he mellowed out.
What is rezealance? A. Defined B. Example C. Origin?
Please be specific.
What is rezealance? A. Defined B. Example C. Origin?
Do you mean resilience?
Reply:It's not a word.
secret garden
What is rezealance? A. Defined B. Example C. Origin?
Do you mean resilience?
Reply:It's not a word.
secret garden
Define evil?
What would your take on evil be? As C.S. Lewis once defined it:
The greatest evil is not done in those sordid dens of evil that Dickens loved to paint ... but is conceived and ordered (moved, seconded, carried and minuted) in clear, carpeted, warmed, well-lighted offices, by quiet men with white collars and cut fingernails and smooth-shaven cheeks who do not need to raise their voices.
Define evil?
evil is anything that causes diminution of happiness
evil is any error in pursuit of your happiness
for instance, we humans have extreme injustice [ie, theft of earnings] - this causes extreme violence - so we humans are evil, ie selfdestructive
we practice extreme injustice, and we consequently continuously reap vast unnecessary suffering, and we cannot learn our lesson
everyone can see that taking 99% of income off 99% of people is going to damage happiness of everyone enormously - everyone can easily see that that is stealing, and that stealing makes people very angry, and inclined to hurt back in some way
yet we have this extreme injustice, and we dont understand we are hurting ourselves terribly
which is amazing and strange, because we all know how destructive it would be to take 99% off 99% of people - how much anger would be generated, how much fighting and danger would be caused
and yet we have 1% of people getting 90% of world income - US$70 trillion a year - US$70,000 per family in the world - huge inequality ie injustice ie theft
and yet we dont do anything about it - apparently we still think that injustice is good - this error is evil, ie wrong, ie selfdestructive
we mostly dont go for getting out as much as we put in to society by our work, but just as much as we can get, however much it is - so we are unjust, we act as if we believe that injustice is good - ie that we can take more than we give and not get hurt, ie that people who are left to take out less than they put in are not going to be angry
we have hourly pay from 1000th to a million times the average hourly pay - 99% are paid less than the average hourly pay - 90% are paid less than a 10th of average - 1% get 90% of wealth - and so of course 99% get 10%
limitless super overpay means limitless super overpower, which means no democracy, which means tyranny, fascism - and we just dont get it - we cant even think about it - we are evil, ie selfdestructive - and apparently for some strange reason, no words can get through people's heads about it
perhaps it is that people's thinking about money is governed by a very primitive part of the human brain [which is made out of reptile brain, wrapped around with a mammal brain covered with a thin layer of rational brain] - and people can only think: oh no, if i am just, i will get less, im never going near justice or fairshares!
if this simplistic thinking is going on in the reptile primitive brain and overriding the rational brain, then it is going to be as hard to get people to think rationally about money as to get a reptile to do math/s
in fact, 99% of people would get better pay with fairpay - with fairpay, every family IN THE WORLD working average hard would be on US$75,000 a year - with injustice we have 1% taking US$70 TRILLION A YEAR, or US$70,000 [average] from every family in the world
and we just cant get it into our heads we would be much happier with fairpay - like kids who might fight over the birthday cake and are told to share, who feel that if they didnt have to share, they would have the whole cake to themselves
whereas the truth is, that if everyone tries to get the whole cake, then everyone is grabbing cake off each other forever, or until the cake is ruined - the primitive brain doesnt remember that other people are going to try to get shares, if you take the whole cake - all the primitive brain in charge of thinking about money can think of is: the whole cake, for me!
if you ask people the cause of wars they say religion and race - they never say injustice or theft of earnings - whereas in every place there are religion and race differences without income injustice, there is no fighting - proving that religion and race are not the real cause of violence, war and crime - but sometimes economic injustice is along religious or racial lines [as in northern ireland and apartheid south africa]
there is something in humans editing out any idea of justice as a cause of happiness - instead there is this irrational absolute blind unthinking faith that injustice [grabbing as much of the cake as we can] is better than justice [taking one's fairshare, taking out of society only as much as you put in by work]
that primitive brain cannot compute the golden rule: if you take more than is yours, you will be followed by an angry person trying to get it back - which will involve you in unhappiness of various sorts: having to labour to keep hold of your overpay, having to spend your time and money and energy keeping hold of the overpay
rationally, it is obviously better to share and to have plenty for all and happiness peace and friendliness, than to have everyone grabbing off everyone all the time, no peace, no friendliness, no safety, no leisure
but humans cannot see this, so they are evil to themselves, selfdestructive - convinced that sharing would be worse when it would be 1000 times better
maybe it would help to get kids to try to grab the whole cake, so that they can see what happens, so they can experience that they get no cake at all, because every bit of cake is in motion constantly between people, and is being destroyed in the fight
so people are evil, ie, stupid, ie, selfdestructive - just dont have the brains - no more to blame than a crocodile for eating a baby that falls in the water - but just as evil
even the acceleration of violence to our present ability to destroy all life by nuclear winter has not been able to get people thinking - most people are no more worried about nuclear winter than crocodiles are
it is our misfortune that we have a few people capable of creating the technology to destroy all life, and at the same time most humans without the brains to see the giant unnecessary misery we cause ourselves -
we could all be on US$75,000 per family working average hard - peace and plenty and global safety and friendliness - all smiles everywhere - if we could just think that thought: taking out more than we put in is theft is violence is misery is extinction - but we cant - as simple as that thought is - despite the fact that everyone can understand that people get angry when they are stolen from
justice is the giant issue for humanity - and no one is talking about it as though it is the giant critical vital issue, absolutely essential for survival of the human species and for happiness - not even c s lewis did
all we are good for is grabbing as much as we can from others, and getting angry when someone grabs from us - we dont see any contradiction in that: we approve of our own grabbing from others, but we highly disapprove of others grabbing from us
and so we have been - virtually all humans, the respectable and the disrespectable - for 1000s of years
although it is no trouble for us to understand that all contribute to the social pool of wealth by their work, that slackers get fired most of the time, that everyone pulls their weight in work[plus or minus only about 10%], that no one can work much longer hours than the average [homemakers 70-90 hours a week] - we somehow manage to convince ourselves that extremely unequal pay for equal work is right and good and not destructive, that justice is somehow unjust and undesirable and wrong -
and we manage to completely dissociate ourselves from the obvious connection between injustice [overpay and underpay, theft] and violence
we do not think that someone being super-overpaid, being paid US$500,000 an hour average, is a thief - no, no, we are all in defence of the superrich - deserves whatever he gets
we do not think that someone being super underpaid, being paid $1 a fortnight, $25 a year, $1000 a lifetime is being robbed, no, no, that person is lazy, inefficient, stupid, something like that - deserves what little he/she gets
there is enough for every family to have US$75,000 a year - that is, every family working average hard produces US$75,000 of goods and services a year - and we starve 50 million people [1% of humanity] every year, in order to superoverpay a very few up to a million times the average hourly pay
absolutely mad-as - at the same time that we are intelligent enough to understand calculus and such things - and somehow the intelligence is unable to notice the madness - a very very curious reality
final irony: we sacrifice the happiness of 99% of people, we starve to death 1% of humanity every year, just so that 1% can be overpaid - and the overpaid get negative benefit from the overpay - because fairpay [US$75,000 per family for working average hard] satisfies virtually all desires - all needs, all major desires, millions of minor desires from tennis rackets to dolls - there is just very little, only very marginal desires that overpay can satisfy - whereas, on the downside, the danger of being overpaid among 99% underpaid is enormous - benefits, very small, disbenefits, very large - like having enough to buy more food when you have a full stomach all the time
teehee - very amusing, but tragic -
folly unbounded
evil - doing harm to self - like hitler: plunder europe, try and grab the whole cake, have to kill yourself - evil is just an error in pursuit of our happiness
Reply:child molesters
Reply:Hilary Clinton
Reply:dont do nothing good at all
Reply:Evil is not defined by the action but by the thoughts behind it. When someone knows what they are doing is considered wrong and they have no justifiable reason for their actions then that is what i would consider evil.
Reply:An action deliberately undertaken which results in the deprivation of another person of their life, liberty or property.
Most actions of socialist do-gooders like Dickens will fall into this category.
Evil is impotent and necessarily derives its power from good people who do not understand the full consequence of their actions (the support of evil).
Tu ne cede malis!
Reply:Evil is any act that deliberately and knowingly undermines the highest good.
Reply:Huge question, but to stay in the spirit of the quote you offer, I would say that evil entails selfishness and sociopathy. Certainly applies to the terrorists of 9/11, London Tube, Madrid trains, Bali nightclub....
Reply:Evil is all things of a negative nature.
Reply:noting good come out from evil never good always baaad
EVIL BAD NEWS ALL-THE BAD THINGS IN LIFE
Reply:Evil is a blatant and complete disregard for the well being of others accompanied with a deliberate tendancy to hurt, belittle, kill, or wound, be it physically or mentally. Evil is senseless and unfortunately powerful, but it can be conquered and overcome.
Reply:No game of words. Anything that LIVEs longer is called Evil.
Reply:Evil is anything against righteousness.
Reply:Evil people are characterized not so much by the magnitude of their sins, but by their consistency.
Reply:I admire C.S. but I think it's simpler than that. Evil is a human causing another human pain of any kind.
Reply:the face of evil is not an ugly one. it's quite the opposite. that's why we would choose to do evil, it looks so good, it feels so good, how could it be wrong?
The greatest evil is not done in those sordid dens of evil that Dickens loved to paint ... but is conceived and ordered (moved, seconded, carried and minuted) in clear, carpeted, warmed, well-lighted offices, by quiet men with white collars and cut fingernails and smooth-shaven cheeks who do not need to raise their voices.
Define evil?
evil is anything that causes diminution of happiness
evil is any error in pursuit of your happiness
for instance, we humans have extreme injustice [ie, theft of earnings] - this causes extreme violence - so we humans are evil, ie selfdestructive
we practice extreme injustice, and we consequently continuously reap vast unnecessary suffering, and we cannot learn our lesson
everyone can see that taking 99% of income off 99% of people is going to damage happiness of everyone enormously - everyone can easily see that that is stealing, and that stealing makes people very angry, and inclined to hurt back in some way
yet we have this extreme injustice, and we dont understand we are hurting ourselves terribly
which is amazing and strange, because we all know how destructive it would be to take 99% off 99% of people - how much anger would be generated, how much fighting and danger would be caused
and yet we have 1% of people getting 90% of world income - US$70 trillion a year - US$70,000 per family in the world - huge inequality ie injustice ie theft
and yet we dont do anything about it - apparently we still think that injustice is good - this error is evil, ie wrong, ie selfdestructive
we mostly dont go for getting out as much as we put in to society by our work, but just as much as we can get, however much it is - so we are unjust, we act as if we believe that injustice is good - ie that we can take more than we give and not get hurt, ie that people who are left to take out less than they put in are not going to be angry
we have hourly pay from 1000th to a million times the average hourly pay - 99% are paid less than the average hourly pay - 90% are paid less than a 10th of average - 1% get 90% of wealth - and so of course 99% get 10%
limitless super overpay means limitless super overpower, which means no democracy, which means tyranny, fascism - and we just dont get it - we cant even think about it - we are evil, ie selfdestructive - and apparently for some strange reason, no words can get through people's heads about it
perhaps it is that people's thinking about money is governed by a very primitive part of the human brain [which is made out of reptile brain, wrapped around with a mammal brain covered with a thin layer of rational brain] - and people can only think: oh no, if i am just, i will get less, im never going near justice or fairshares!
if this simplistic thinking is going on in the reptile primitive brain and overriding the rational brain, then it is going to be as hard to get people to think rationally about money as to get a reptile to do math/s
in fact, 99% of people would get better pay with fairpay - with fairpay, every family IN THE WORLD working average hard would be on US$75,000 a year - with injustice we have 1% taking US$70 TRILLION A YEAR, or US$70,000 [average] from every family in the world
and we just cant get it into our heads we would be much happier with fairpay - like kids who might fight over the birthday cake and are told to share, who feel that if they didnt have to share, they would have the whole cake to themselves
whereas the truth is, that if everyone tries to get the whole cake, then everyone is grabbing cake off each other forever, or until the cake is ruined - the primitive brain doesnt remember that other people are going to try to get shares, if you take the whole cake - all the primitive brain in charge of thinking about money can think of is: the whole cake, for me!
if you ask people the cause of wars they say religion and race - they never say injustice or theft of earnings - whereas in every place there are religion and race differences without income injustice, there is no fighting - proving that religion and race are not the real cause of violence, war and crime - but sometimes economic injustice is along religious or racial lines [as in northern ireland and apartheid south africa]
there is something in humans editing out any idea of justice as a cause of happiness - instead there is this irrational absolute blind unthinking faith that injustice [grabbing as much of the cake as we can] is better than justice [taking one's fairshare, taking out of society only as much as you put in by work]
that primitive brain cannot compute the golden rule: if you take more than is yours, you will be followed by an angry person trying to get it back - which will involve you in unhappiness of various sorts: having to labour to keep hold of your overpay, having to spend your time and money and energy keeping hold of the overpay
rationally, it is obviously better to share and to have plenty for all and happiness peace and friendliness, than to have everyone grabbing off everyone all the time, no peace, no friendliness, no safety, no leisure
but humans cannot see this, so they are evil to themselves, selfdestructive - convinced that sharing would be worse when it would be 1000 times better
maybe it would help to get kids to try to grab the whole cake, so that they can see what happens, so they can experience that they get no cake at all, because every bit of cake is in motion constantly between people, and is being destroyed in the fight
so people are evil, ie, stupid, ie, selfdestructive - just dont have the brains - no more to blame than a crocodile for eating a baby that falls in the water - but just as evil
even the acceleration of violence to our present ability to destroy all life by nuclear winter has not been able to get people thinking - most people are no more worried about nuclear winter than crocodiles are
it is our misfortune that we have a few people capable of creating the technology to destroy all life, and at the same time most humans without the brains to see the giant unnecessary misery we cause ourselves -
we could all be on US$75,000 per family working average hard - peace and plenty and global safety and friendliness - all smiles everywhere - if we could just think that thought: taking out more than we put in is theft is violence is misery is extinction - but we cant - as simple as that thought is - despite the fact that everyone can understand that people get angry when they are stolen from
justice is the giant issue for humanity - and no one is talking about it as though it is the giant critical vital issue, absolutely essential for survival of the human species and for happiness - not even c s lewis did
all we are good for is grabbing as much as we can from others, and getting angry when someone grabs from us - we dont see any contradiction in that: we approve of our own grabbing from others, but we highly disapprove of others grabbing from us
and so we have been - virtually all humans, the respectable and the disrespectable - for 1000s of years
although it is no trouble for us to understand that all contribute to the social pool of wealth by their work, that slackers get fired most of the time, that everyone pulls their weight in work[plus or minus only about 10%], that no one can work much longer hours than the average [homemakers 70-90 hours a week] - we somehow manage to convince ourselves that extremely unequal pay for equal work is right and good and not destructive, that justice is somehow unjust and undesirable and wrong -
and we manage to completely dissociate ourselves from the obvious connection between injustice [overpay and underpay, theft] and violence
we do not think that someone being super-overpaid, being paid US$500,000 an hour average, is a thief - no, no, we are all in defence of the superrich - deserves whatever he gets
we do not think that someone being super underpaid, being paid $1 a fortnight, $25 a year, $1000 a lifetime is being robbed, no, no, that person is lazy, inefficient, stupid, something like that - deserves what little he/she gets
there is enough for every family to have US$75,000 a year - that is, every family working average hard produces US$75,000 of goods and services a year - and we starve 50 million people [1% of humanity] every year, in order to superoverpay a very few up to a million times the average hourly pay
absolutely mad-as - at the same time that we are intelligent enough to understand calculus and such things - and somehow the intelligence is unable to notice the madness - a very very curious reality
final irony: we sacrifice the happiness of 99% of people, we starve to death 1% of humanity every year, just so that 1% can be overpaid - and the overpaid get negative benefit from the overpay - because fairpay [US$75,000 per family for working average hard] satisfies virtually all desires - all needs, all major desires, millions of minor desires from tennis rackets to dolls - there is just very little, only very marginal desires that overpay can satisfy - whereas, on the downside, the danger of being overpaid among 99% underpaid is enormous - benefits, very small, disbenefits, very large - like having enough to buy more food when you have a full stomach all the time
teehee - very amusing, but tragic -
folly unbounded
evil - doing harm to self - like hitler: plunder europe, try and grab the whole cake, have to kill yourself - evil is just an error in pursuit of our happiness
Reply:child molesters
Reply:Hilary Clinton
Reply:dont do nothing good at all
Reply:Evil is not defined by the action but by the thoughts behind it. When someone knows what they are doing is considered wrong and they have no justifiable reason for their actions then that is what i would consider evil.
Reply:An action deliberately undertaken which results in the deprivation of another person of their life, liberty or property.
Most actions of socialist do-gooders like Dickens will fall into this category.
Evil is impotent and necessarily derives its power from good people who do not understand the full consequence of their actions (the support of evil).
Tu ne cede malis!
Reply:Evil is any act that deliberately and knowingly undermines the highest good.
Reply:Huge question, but to stay in the spirit of the quote you offer, I would say that evil entails selfishness and sociopathy. Certainly applies to the terrorists of 9/11, London Tube, Madrid trains, Bali nightclub....
Reply:Evil is all things of a negative nature.
Reply:noting good come out from evil never good always baaad
EVIL BAD NEWS ALL-THE BAD THINGS IN LIFE
Reply:Evil is a blatant and complete disregard for the well being of others accompanied with a deliberate tendancy to hurt, belittle, kill, or wound, be it physically or mentally. Evil is senseless and unfortunately powerful, but it can be conquered and overcome.
Reply:No game of words. Anything that LIVEs longer is called Evil.
Reply:Evil is anything against righteousness.
Reply:Evil people are characterized not so much by the magnitude of their sins, but by their consistency.
Reply:I admire C.S. but I think it's simpler than that. Evil is a human causing another human pain of any kind.
Reply:the face of evil is not an ugly one. it's quite the opposite. that's why we would choose to do evil, it looks so good, it feels so good, how could it be wrong?
What are the five C's of credit and why are each important?
I have had no trouble defining the 5 C's of credit but finding the answer as to why these things are important and how they apply to the business world has proven to be more challenging. Any help clearing up this confusion would be greatly appreciated.
What are the five C's of credit and why are each important?
Character — What is the character of the management of the company? What is management's reputation in the industry and the community? Investors want to put their money with those who have impeccable credentials and references. The way you treat your employees and customers, the way you take responsibility, your timeliness in fulfilling your obligations — these are all part of the character question.
This is really about you and your personal leadership. How you lead yourself and conduct both your business and personal life gives the lender a clue about how you are likely to handle leadership as a CEO. It's a banker's responsibility to look at the downside of making a loan. Your character immediately comes into play if there is a business crisis, for example. As small business owners, we place our personal stamp on everything that affects our companies. Often, banks do not even differentiate between us and our businesses. This is one of the reasons why the credit scoring process evolved, with a large component being our personal credit history.
Capacity — What is your company's borrowing history and track record of repayment? How much debt can your company handle? Will you be able to honor the obligation and repay the debt? There are numerous financial benchmarks, such as debt and liquidity ratios, that investors evaluate before advancing funds. Become familiar with the expected pattern in your industry. Some industries can take a higher debt load; others may operate with less liquidity.
Capital — How well-capitalized is your company? How much money have you invested in the business? Investors often want to see that you have a financial commitment and that you have put yourself at risk in the company. Both your company's financial statements and your personal credit are keys to the capital question. If the company is operating with a negative net worth, for example, will you be prepared to add more of your own money? How far will your personal resources support both you and the business as it is growing? If the company has not yet made profits, this may be offset by an excellent customer list and payment history. All of these issues intertwine, and you want to ensure that the bank perceives the business as solid.
Conditions — What are the current economic conditions and how does your company fit in? If your business is sensitive to economic downturns, for example, the bank wants a comfort level that you're managing productivity and expenses. What are the trends for your industry, and how does your company fit within them? Are there any economic or political hot potatoes that could negatively impact the growth of your business?
Collateral — While cash flow will nearly always be the primary source of repayment of a loan, bankers look at what they call the secondary source of repayment. Collateral represents assets that the company pledges as an alternate repayment source for the loan. Most collateral is in the form of hard assets, such as real estate and office or manufacturing equipment. Alternatively, your accounts receivable and inventory can be pledged as collateral.
The collateral issue is a bigger challenge for service businesses, as they have fewer hard assets to pledge. Until your business is proven, you're nearly always going to pledge collateral. If it doesn't come from your business, the bank will look to your personal assets. This clearly has its risks — you don't want to be in a situation where you can lose your house because a business loan has turned sour. If you want to be borrowing from banks or other lenders, you need to think long and hard about how you'll handle this collateral question.
Keep in mind that in evaluating the five C's of credit, investors don't give equal weight to each area. Lenders are cautious, and one weak area could offset all the other strengths you show. For example, if your industry is sensitive to economic swings, your company may have difficulty getting a loan during an economic downturn — even if all other factors are strong. And if you're not perceived as a person of character and integrity, there's little likelihood you'll receive a loan, no matter how good your financial statements may be. As you can see, lenders evaluate your company as a total package, which is often more than the sum of the parts. The biggest element, however, will always be you.
What are the five C's of credit and why are each important?
Character — What is the character of the management of the company? What is management's reputation in the industry and the community? Investors want to put their money with those who have impeccable credentials and references. The way you treat your employees and customers, the way you take responsibility, your timeliness in fulfilling your obligations — these are all part of the character question.
This is really about you and your personal leadership. How you lead yourself and conduct both your business and personal life gives the lender a clue about how you are likely to handle leadership as a CEO. It's a banker's responsibility to look at the downside of making a loan. Your character immediately comes into play if there is a business crisis, for example. As small business owners, we place our personal stamp on everything that affects our companies. Often, banks do not even differentiate between us and our businesses. This is one of the reasons why the credit scoring process evolved, with a large component being our personal credit history.
Capacity — What is your company's borrowing history and track record of repayment? How much debt can your company handle? Will you be able to honor the obligation and repay the debt? There are numerous financial benchmarks, such as debt and liquidity ratios, that investors evaluate before advancing funds. Become familiar with the expected pattern in your industry. Some industries can take a higher debt load; others may operate with less liquidity.
Capital — How well-capitalized is your company? How much money have you invested in the business? Investors often want to see that you have a financial commitment and that you have put yourself at risk in the company. Both your company's financial statements and your personal credit are keys to the capital question. If the company is operating with a negative net worth, for example, will you be prepared to add more of your own money? How far will your personal resources support both you and the business as it is growing? If the company has not yet made profits, this may be offset by an excellent customer list and payment history. All of these issues intertwine, and you want to ensure that the bank perceives the business as solid.
Conditions — What are the current economic conditions and how does your company fit in? If your business is sensitive to economic downturns, for example, the bank wants a comfort level that you're managing productivity and expenses. What are the trends for your industry, and how does your company fit within them? Are there any economic or political hot potatoes that could negatively impact the growth of your business?
Collateral — While cash flow will nearly always be the primary source of repayment of a loan, bankers look at what they call the secondary source of repayment. Collateral represents assets that the company pledges as an alternate repayment source for the loan. Most collateral is in the form of hard assets, such as real estate and office or manufacturing equipment. Alternatively, your accounts receivable and inventory can be pledged as collateral.
The collateral issue is a bigger challenge for service businesses, as they have fewer hard assets to pledge. Until your business is proven, you're nearly always going to pledge collateral. If it doesn't come from your business, the bank will look to your personal assets. This clearly has its risks — you don't want to be in a situation where you can lose your house because a business loan has turned sour. If you want to be borrowing from banks or other lenders, you need to think long and hard about how you'll handle this collateral question.
Keep in mind that in evaluating the five C's of credit, investors don't give equal weight to each area. Lenders are cautious, and one weak area could offset all the other strengths you show. For example, if your industry is sensitive to economic swings, your company may have difficulty getting a loan during an economic downturn — even if all other factors are strong. And if you're not perceived as a person of character and integrity, there's little likelihood you'll receive a loan, no matter how good your financial statements may be. As you can see, lenders evaluate your company as a total package, which is often more than the sum of the parts. The biggest element, however, will always be you.
Let c be a real number. Let f be defined for x in (c,infinity) and f(x) > 0 for all x in (c,infinity).?
Show that lim as x-%26gt;c of f = infinity if and only if lim as x approaches c of 1/f = 0.
Let c be a real number. Let f be defined for x in (c,infinity) and f(x) %26gt; 0 for all x in (c,infinity).?
(=%26gt;) Suppose lim (x-%26gt;c) f(x) = ∞ and let ε %26gt; 0. Then let N = 1/ε. Since lim (x-%26gt;c) f(x) = ∞ there exists δ %26gt; 0 such that for c %26lt; x %26lt; c+δ, f(x) %26gt; N %26gt; 0. So for c %26lt; x %26lt; c+δ, 1/f(x) %26lt; 1/N = ε. So lim (x-%26gt;c) 1/f(x) = 0.
(%26lt;=) Suppose lim (x-%26gt;c) 1/f(x) = 0 and let N %26gt; 0. Then let ε = 1/N. Since lim (x-%26gt;c) 1/f(x) = 0 there exists δ %26gt; 0 such that for c %26lt; x %26lt; c+δ, |1/f(x)| %26lt; ε. Since f(x) %26gt; 0 for all x %26gt; c, we have 0 %26lt; 1/f(x) %26lt; ε. So f(x) %26gt; 1/ε = N. So lim (x-%26gt;c) f(x) = ∞.
Let c be a real number. Let f be defined for x in (c,infinity) and f(x) %26gt; 0 for all x in (c,infinity).?
(=%26gt;) Suppose lim (x-%26gt;c) f(x) = ∞ and let ε %26gt; 0. Then let N = 1/ε. Since lim (x-%26gt;c) f(x) = ∞ there exists δ %26gt; 0 such that for c %26lt; x %26lt; c+δ, f(x) %26gt; N %26gt; 0. So for c %26lt; x %26lt; c+δ, 1/f(x) %26lt; 1/N = ε. So lim (x-%26gt;c) 1/f(x) = 0.
(%26lt;=) Suppose lim (x-%26gt;c) 1/f(x) = 0 and let N %26gt; 0. Then let ε = 1/N. Since lim (x-%26gt;c) 1/f(x) = 0 there exists δ %26gt; 0 such that for c %26lt; x %26lt; c+δ, |1/f(x)| %26lt; ε. Since f(x) %26gt; 0 for all x %26gt; c, we have 0 %26lt; 1/f(x) %26lt; ε. So f(x) %26gt; 1/ε = N. So lim (x-%26gt;c) f(x) = ∞.
Supersaturation is defined as S=C/C*. What are C and C*. This relates to crystallization process.?
C is the actual concentration in solution of the substance you want to crystallize, and C* is the concentration of that substance in solution when it is in equilibrium with the solid at the temperature and pressure of interest.
In order for a solute to crystallize from solution, the concentration of that solute must exceed it's equilibrium concentration. If C = C*, then nothing happens -- the rate at which molecules of the material are added to the solid is exactly equal to the rate at which molecules spontaneously leave the surface, so the solid neither dissolves nor gains mass.
If C %26lt; C*, the solid will dissolve until C = C*
If C %26gt; C*, then the solute will precipitate (and if there is a pre-existing piece of the solid present, it will most likely precipitate on that preexisting surface) and the concentration in solution will decrease until C = C*. In order for crystallization to continue (i.e., for the solute to continue to precipitate) one needs to constantly adjust the conditions so that C is always greater than C*. This can be accomplished, for instance, by evaporation of the solvent (thus concentrating the solution, i.e., making C bigger), or by changing the temperature of the solution (the solubility of most solids increases with increasing temperature; for such solutes, decreasing the temperature will make C* smaller).
pear
In order for a solute to crystallize from solution, the concentration of that solute must exceed it's equilibrium concentration. If C = C*, then nothing happens -- the rate at which molecules of the material are added to the solid is exactly equal to the rate at which molecules spontaneously leave the surface, so the solid neither dissolves nor gains mass.
If C %26lt; C*, the solid will dissolve until C = C*
If C %26gt; C*, then the solute will precipitate (and if there is a pre-existing piece of the solid present, it will most likely precipitate on that preexisting surface) and the concentration in solution will decrease until C = C*. In order for crystallization to continue (i.e., for the solute to continue to precipitate) one needs to constantly adjust the conditions so that C is always greater than C*. This can be accomplished, for instance, by evaporation of the solvent (thus concentrating the solution, i.e., making C bigger), or by changing the temperature of the solution (the solubility of most solids increases with increasing temperature; for such solutes, decreasing the temperature will make C* smaller).
pear
Big database in c++?
If I write big program in c++(example hospital,school) and i need database to store the info .
How I can define big database in c++(except *.txt file) ?
Thank's
Big database in c++?
like everyone else do, connect to a database (Oracle, MySQL, PostgreSQL, DB2, FireBird) etc etc.
Reply:You can use Microsoft Access Database
How I can define big database in c++(except *.txt file) ?
Thank's
Big database in c++?
like everyone else do, connect to a database (Oracle, MySQL, PostgreSQL, DB2, FireBird) etc etc.
Reply:You can use Microsoft Access Database
How to Dealocate Variables in C#?
In need to know, with the most explanation of the code possible, how to Dealocate/ Erase defined variable in C# after they have been defined.
Example:
int a = 5;
\\ I need to erase that defined variable in RAM
How to Dealocate Variables in C#?
There is no need to explicitely deallocate variables / memory. c# will free up the memory as soon as the variable has gone out of scope.
There are many who believe this system doesn't work and produces leaks - but my experience has shown that these alleged leaks are really objects / variables still in scope - perhaps in less obvious ways.
Try looking into the System.GC (Garbage Collector) class and stuff like GC.Collect - but unless you have a thorough understand of the .Net CLR, let it be managed for you.
Reply:it is automatically erased
by the way u can use keyword "delete" to delete a pointr
Example:
int a = 5;
\\ I need to erase that defined variable in RAM
How to Dealocate Variables in C#?
There is no need to explicitely deallocate variables / memory. c# will free up the memory as soon as the variable has gone out of scope.
There are many who believe this system doesn't work and produces leaks - but my experience has shown that these alleged leaks are really objects / variables still in scope - perhaps in less obvious ways.
Try looking into the System.GC (Garbage Collector) class and stuff like GC.Collect - but unless you have a thorough understand of the .Net CLR, let it be managed for you.
Reply:it is automatically erased
by the way u can use keyword "delete" to delete a pointr
The complex numbers C can be identified with the vector space R^2 via the identification c + di ---> [c, d].
Let w = a + bi define the map T:C---%26gt;C as T(z) = wz.
a) Use the identification of C with R^2 that is mentioned above and show that T can be viewed as a linear transformation from R^2 to R^2.
b) find the matrix that represents T with respect to the standard basis of R^2.
The complex numbers C can be identified with the vector space R^2 via the identification c + di ---%26gt; [c, d].
When you multiply out (a + bi) * (x + yi) and rephrase it in terms of ordered pairs, you get
T (x,y) = (ax - by, bx + ay).
So the matrix of T has a -b for its first row and b a for its second row.
a) Use the identification of C with R^2 that is mentioned above and show that T can be viewed as a linear transformation from R^2 to R^2.
b) find the matrix that represents T with respect to the standard basis of R^2.
The complex numbers C can be identified with the vector space R^2 via the identification c + di ---%26gt; [c, d].
When you multiply out (a + bi) * (x + yi) and rephrase it in terms of ordered pairs, you get
T (x,y) = (ax - by, bx + ay).
So the matrix of T has a -b for its first row and b a for its second row.
C++ date code question?
The following syntax performs what type of function?
Date vDay(2,14,1993);
a)performs no function
b) overwrites the previously defined variable vDay
c) calls an operating system funciton to set the date
d) defines a new object variable
Thanks to anyone who posts.
C++ date code question?
Technically, e) for none of the above. But given those choices then d).
The reason d) is technically wrong is that you define a TYPE not a variable. The type Date is "defined" somewhere else. This code is just instantiating an object of that type.
Reply:d)
nobile
Date vDay(2,14,1993);
a)performs no function
b) overwrites the previously defined variable vDay
c) calls an operating system funciton to set the date
d) defines a new object variable
Thanks to anyone who posts.
C++ date code question?
Technically, e) for none of the above. But given those choices then d).
The reason d) is technically wrong is that you define a TYPE not a variable. The type Date is "defined" somewhere else. This code is just instantiating an object of that type.
Reply:d)
nobile
Parsing a C program using compiler tools - LEX & YACC?
How to write a C program (using compiler tools - Lex, YACC, Flex, Bison) that will parse a C program and generate a PHP file where the variables defined in the C Program will be defined following the syntax of PHP.
Thanks
Parsing a C program using compiler tools - LEX %26amp; YACC?
google.com
Thanks
Parsing a C program using compiler tools - LEX %26amp; YACC?
google.com
Error C4430: missing type specifier - int assumed. Note: C++ does not support default-int?
I am compiling in Visual Studio 2005
Are any changes required around extern "C" for it to compile in VS 2005?
I am making a simple Windows Console application
Project type: DLL
Started with Empty project
Header File Code:
**********************
ifndef _DLL_TUTORIAL_H_
#define _DLL_TUTORIAL_H_
#include %26lt;iostream%26gt;
#if defined DLL_EXPORT
#define DECLDIR __declspec(dllexport)
#else
#define DECLDIR __declspec(dllimport)
#endif
extern "C"
{
DECLDIR int Add( int a, int b );
DECLDIR void Function( void );
}
CPP File Code
******************
#include %26lt;iostream%26gt;
#include "DLL_Tutorial.h"
#define DLL_EXPORT
extern "C"
{
DECLDIR int Add( int a, int b )
{
return( a + b );
}
DECLDIR void Function( void )
{
std::cout %26lt;%26lt; "DLL Called!" %26lt;%26lt; std::endl;
}
}
Error C4430: missing type specifier - int assumed. Note: C++ does not support default-int?
#include "DLL_Tutorial.h"
#define DLL_EXPORT
Is that order intended? I notice that your DLL_Tutorial.h is looking for DLL_EXPORT to be defined, but it won't be set yet at the point where it's included .
May or may not be the root of your problem -- did your error come with a line #? What line does it map to in the file?
Are any changes required around extern "C" for it to compile in VS 2005?
I am making a simple Windows Console application
Project type: DLL
Started with Empty project
Header File Code:
**********************
ifndef _DLL_TUTORIAL_H_
#define _DLL_TUTORIAL_H_
#include %26lt;iostream%26gt;
#if defined DLL_EXPORT
#define DECLDIR __declspec(dllexport)
#else
#define DECLDIR __declspec(dllimport)
#endif
extern "C"
{
DECLDIR int Add( int a, int b );
DECLDIR void Function( void );
}
CPP File Code
******************
#include %26lt;iostream%26gt;
#include "DLL_Tutorial.h"
#define DLL_EXPORT
extern "C"
{
DECLDIR int Add( int a, int b )
{
return( a + b );
}
DECLDIR void Function( void )
{
std::cout %26lt;%26lt; "DLL Called!" %26lt;%26lt; std::endl;
}
}
Error C4430: missing type specifier - int assumed. Note: C++ does not support default-int?
#include "DLL_Tutorial.h"
#define DLL_EXPORT
Is that order intended? I notice that your DLL_Tutorial.h is looking for DLL_EXPORT to be defined, but it won't be set yet at the point where it's included .
May or may not be the root of your problem -- did your error come with a line #? What line does it map to in the file?
If A and B are 8 x2 matrices, and C is a 5 x 8 matrix, which of the following are defined?
If A and B are 8 x2 matrices, and C is a 5 x 8 matrix, which of the following are defined?
A. B–A
B. AC
C. C transpose
D. BA transpose
E. CB
F. C+A
If A and B are 8 x2 matrices, and C is a 5 x 8 matrix, which of the following are defined?
A. since B and A have the same dimensions, B - A is defined.
B. since A is 8x2, AX is defined only if X is a 2xn matrix.
C. transpose is always defined
D. B(A transpose) is 8x2 times 2x8, which is defined
E. CB is 5x8 times 8x2, defined, resulting in a 5x2 matrix.
F. not defined since not same dimensions.
Reply:A. since B and A have the same dimensions, B - A is possible and defined.
B. since A is 8x2,and C is 5x8 it is not defined( because for a matrix to be able to mutiply another both of them sholuld have their orders in the form as mxn and nxp ).
C. transpose is defined for any kind of matrix
D. (BA) transpose is not defined) but B(A transpose) is defined
E. CB is defined and is a 5x2 matrix.
F. A+B isnot defined since not same dimensions.
A. B–A
B. AC
C. C transpose
D. BA transpose
E. CB
F. C+A
If A and B are 8 x2 matrices, and C is a 5 x 8 matrix, which of the following are defined?
A. since B and A have the same dimensions, B - A is defined.
B. since A is 8x2, AX is defined only if X is a 2xn matrix.
C. transpose is always defined
D. B(A transpose) is 8x2 times 2x8, which is defined
E. CB is 5x8 times 8x2, defined, resulting in a 5x2 matrix.
F. not defined since not same dimensions.
Reply:A. since B and A have the same dimensions, B - A is possible and defined.
B. since A is 8x2,and C is 5x8 it is not defined( because for a matrix to be able to mutiply another both of them sholuld have their orders in the form as mxn and nxp ).
C. transpose is defined for any kind of matrix
D. (BA) transpose is not defined) but B(A transpose) is defined
E. CB is defined and is a 5x2 matrix.
F. A+B isnot defined since not same dimensions.
Let A = {a, b, c} , and let R be the relation defined on A defined by the following matrix:?
MR = 1 0 1
1 1 0
0 1 1
(a) (10 pts.) Describe R by listing the ordered pairs in R and draw the digraph of this relation.
(b) (15 pts.) Which of the properties: reflexive, antisymmetric and transitive are true for the given relation? Begin your discussion by defining each term in general first and then how the definition relates to this specific example.
(c) (5 pts.) Is this relation a partial order? Explain. If this relation a partial order, draw its Hasse diagram.
(d) (10 pts.) Use Warshall’s Algorithm (Section 8.4 of the text.) to determine the transitive closure of R. Note there are 2 versions of Washall’s Algorithm given in the text, that illustrated by example 7, page 549 and that illustrated by example 8, page 551. Use any version you wish.
(e) (5 points) Draw the digraph of the transitive closure of R and use the digraph to explain the idea of connectivity. Is this graph connected? What does connectivity mean?
Let A = {a, b, c} , and let R be the relation defined on A defined by the following matrix:?
MR = 1 0 1
1 1 0
0 1 1
(a) (10 pts.) Describe R by listing the ordered pairs in R and draw the digraph of this relation.
(a,a), (a,b), (b,b), (b,c), (c,a), (c,b) .
flower girl dresses
1 1 0
0 1 1
(a) (10 pts.) Describe R by listing the ordered pairs in R and draw the digraph of this relation.
(b) (15 pts.) Which of the properties: reflexive, antisymmetric and transitive are true for the given relation? Begin your discussion by defining each term in general first and then how the definition relates to this specific example.
(c) (5 pts.) Is this relation a partial order? Explain. If this relation a partial order, draw its Hasse diagram.
(d) (10 pts.) Use Warshall’s Algorithm (Section 8.4 of the text.) to determine the transitive closure of R. Note there are 2 versions of Washall’s Algorithm given in the text, that illustrated by example 7, page 549 and that illustrated by example 8, page 551. Use any version you wish.
(e) (5 points) Draw the digraph of the transitive closure of R and use the digraph to explain the idea of connectivity. Is this graph connected? What does connectivity mean?
Let A = {a, b, c} , and let R be the relation defined on A defined by the following matrix:?
MR = 1 0 1
1 1 0
0 1 1
(a) (10 pts.) Describe R by listing the ordered pairs in R and draw the digraph of this relation.
(a,a), (a,b), (b,b), (b,c), (c,a), (c,b) .
flower girl dresses
I defined a variable x int in C++....?
x is a user defined variable in a program as simple as converting fahrenheit; if you enter a letter, it comes out as 32 degrees F; 0 degrees C. Is there any way to tell C++, "If the user enters a letter for x, than say "You entered a letter instead of number. Please try again." ?
I defined a variable x int in C++....?
Answer at link below. You basically have to loop through all the characters in the input string and test each one to see if it is a digit; if any of the characters fail, exit the loop and display the error message.
Reply:You'd have to set it up as a loop, and if a number wasn't entered, you can have it display the error message and repeat.
I defined a variable x int in C++....?
Answer at link below. You basically have to loop through all the characters in the input string and test each one to see if it is a digit; if any of the characters fail, exit the loop and display the error message.
Reply:You'd have to set it up as a loop, and if a number wasn't entered, you can have it display the error message and repeat.
C%ck blocking???
wtf is c%ck blocking?? please define!
C%ck blocking???
Scenerio:
You out having fun with someone your really hitting it off with. The person you like also like's you very much. You are both thinking of going home together to play scrabble or whatever but they have this one friend who convences them that they shouldnt go with you for whatever reason. The friend drags them off and tells you goodnight. You have just been C**k blocked! :)
Reply:A cock blocker is someone who interferes with you while you are in pursuit of a woman..
Reply:It's when a guy tries to prohibit another guy from getting any sexual play from a girl, for whatever reason.
C%ck blocking???
Scenerio:
You out having fun with someone your really hitting it off with. The person you like also like's you very much. You are both thinking of going home together to play scrabble or whatever but they have this one friend who convences them that they shouldnt go with you for whatever reason. The friend drags them off and tells you goodnight. You have just been C**k blocked! :)
Reply:A cock blocker is someone who interferes with you while you are in pursuit of a woman..
Reply:It's when a guy tries to prohibit another guy from getting any sexual play from a girl, for whatever reason.
1.Write a C++ program that defines an array of 30 integers. Your program should put 30 random values (between
Im really spent on this question. Someone please help.
1.Write a C++ program that defines an array of 30 integers. Your program should put 30 random values (between
declare an array of 30 integers.
example:
int integers[30];
to get the random values;
use the rand() function in the stdlib header file;
however it will give you the same values everytime, if you want different values seed it first
to seed the rand(), use the srand(seed);
you decide the seed value or it can be defined by the system by calling time to return the number of seconds the computer has been turned on.
then just loop it with a "for" loop
srand(seed)
for (int i= 0; i %26lt; 30; i++) {
integers[i] = rand(); //convert this first to a valid integer
}
rand() gives you random numbers not necessarily within the range of an integer type.
Reply:What have you done so far?
1.Write a C++ program that defines an array of 30 integers. Your program should put 30 random values (between
declare an array of 30 integers.
example:
int integers[30];
to get the random values;
use the rand() function in the stdlib header file;
however it will give you the same values everytime, if you want different values seed it first
to seed the rand(), use the srand(seed);
you decide the seed value or it can be defined by the system by calling time to return the number of seconds the computer has been turned on.
then just loop it with a "for" loop
srand(seed)
for (int i= 0; i %26lt; 30; i++) {
integers[i] = rand(); //convert this first to a valid integer
}
rand() gives you random numbers not necessarily within the range of an integer type.
Reply:What have you done so far?
Suppose A is a 4x2 matrix, B is a 2x2 matix & C is a 2x5 matrix. Which of the following is not defined?
a. CC
b. (AB)C
c. AB+3A
d. AC
e. All are defined
For the matrice defined, what is the dimension of BC+C?
a. 2x5
b. 4x10
c. 5x2
d. it's not defined
e. none of the above
Suppose A is a 4x2 matrix, B is a 2x2 matix %26amp; C is a 2x5 matrix. Which of the following is not defined?
This is trying to teach you the rules of matrix addition and multiplication.
1) To add 2 matricies, the dimensions must be the same.
2) To multiply 2 matricies XY, the columns of X must equal the rows of Y. The result is the rows of X by the columns of Y.
Hence a. CC is not defined.C (2x5)*(2x5) is not defined since columns of C do not equal rows of C
BC =%26gt; (2x2)(2x5) =%26gt; 2x5
BC(2x5) + C (2x5) =%26gt; 2x5
Reply:a) for both questions
Reply:Suppose A is a 4x2 matrix, B is a 2x2 matix %26amp; C is a 2x5 matrix. Which of the following is not defined?
a. CC Not defined
b. (AB)C Defined
c. AB+3A Defined
d. AC Defined.
e. All are defined. Not correct.
Answer =(a)
For the matrice defined, what is the dimension of BC+C?
a. 2x5 correct
b. 4x10
c. 5x2
d. it's not defined
e. none of the above
Answer = (a)
Reply:#1: (a) because you cannot multiply a 2x5 with a 2x5 (inner dimensions must match)
#2: (a)
if you multiply (A x B) * (C x D), B must equal C and the product will have dimensions (A x D)
flower garden
b. (AB)C
c. AB+3A
d. AC
e. All are defined
For the matrice defined, what is the dimension of BC+C?
a. 2x5
b. 4x10
c. 5x2
d. it's not defined
e. none of the above
Suppose A is a 4x2 matrix, B is a 2x2 matix %26amp; C is a 2x5 matrix. Which of the following is not defined?
This is trying to teach you the rules of matrix addition and multiplication.
1) To add 2 matricies, the dimensions must be the same.
2) To multiply 2 matricies XY, the columns of X must equal the rows of Y. The result is the rows of X by the columns of Y.
Hence a. CC is not defined.C (2x5)*(2x5) is not defined since columns of C do not equal rows of C
BC =%26gt; (2x2)(2x5) =%26gt; 2x5
BC(2x5) + C (2x5) =%26gt; 2x5
Reply:a) for both questions
Reply:Suppose A is a 4x2 matrix, B is a 2x2 matix %26amp; C is a 2x5 matrix. Which of the following is not defined?
a. CC Not defined
b. (AB)C Defined
c. AB+3A Defined
d. AC Defined.
e. All are defined. Not correct.
Answer =(a)
For the matrice defined, what is the dimension of BC+C?
a. 2x5 correct
b. 4x10
c. 5x2
d. it's not defined
e. none of the above
Answer = (a)
Reply:#1: (a) because you cannot multiply a 2x5 with a 2x5 (inner dimensions must match)
#2: (a)
if you multiply (A x B) * (C x D), B must equal C and the product will have dimensions (A x D)
flower garden
Difficult C++ pointer question, PLEASE HELP!!!!?
I'm reading this tutorial on c++, apparently when you define a pointer to be const, the address of that pointer can not be changed. However the below code defines a pointer as const called pointer and points to the address of variable a1, however i then give the pointer a new address (variable a2). I'm really confused because point was declared as a constant, yet a can change the address of the pointer and the program compiles with out any errors. can any body explain to whats happening and y my theory isn't working?
#include%26lt;iostream%26gt;
int main()
{
int a1 = 1, a2 = 2;
int const *point = 0;
point = %26amp;a1;
std::cout%26lt;%26lt;*point%26lt;%26lt;'\n';
point = %26amp;a2;
std::cout%26lt;%26lt;*point%26lt;%26lt;'\n';
system("pause");
return 0;
}
output:
--------
1
2
press any key to continue........
Difficult C++ pointer question, PLEASE HELP!!!!?
the compiler interprets
int const *point
as
const int *point
which mean it is a pointer to a constant integer.
change it to
int * const point
will cause the pointer point to not be changed.
Reply:The correct syntax for a constant pointer (that is a pointer that is constant itself rather than a pointer that points to a constant) would be:-
int* const point
Reply:The thing pointed to by the pointer is considered constant.
Reply:i asked the same question to myself just the other day, i worked on the problem for a week and resolved it but then i was diagnosed with a rare form of degenerative brain stem deterioration and i have short term memory loss as a result, but i knew i worked this out, i just cant remember so I'll let you know next year
Reply:Its because assigning a value and pointing to a variable are two different things. Its kind of like what the 1st person said.
For ex: point = %26amp;a1;
In this line, point is pointing to the variable a1.
Now try changing the value of a1 USING point.
ex:
*point = 5;
or
*point = 8;
or
*point = a2;
All will generate an error BECAUSE point was declared as a constant. Now try removing const from your declaration, all the above statements should execute correctly.
#include%26lt;iostream%26gt;
int main()
{
int a1 = 1, a2 = 2;
int const *point = 0;
point = %26amp;a1;
std::cout%26lt;%26lt;*point%26lt;%26lt;'\n';
point = %26amp;a2;
std::cout%26lt;%26lt;*point%26lt;%26lt;'\n';
system("pause");
return 0;
}
output:
--------
1
2
press any key to continue........
Difficult C++ pointer question, PLEASE HELP!!!!?
the compiler interprets
int const *point
as
const int *point
which mean it is a pointer to a constant integer.
change it to
int * const point
will cause the pointer point to not be changed.
Reply:The correct syntax for a constant pointer (that is a pointer that is constant itself rather than a pointer that points to a constant) would be:-
int* const point
Reply:The thing pointed to by the pointer is considered constant.
Reply:i asked the same question to myself just the other day, i worked on the problem for a week and resolved it but then i was diagnosed with a rare form of degenerative brain stem deterioration and i have short term memory loss as a result, but i knew i worked this out, i just cant remember so I'll let you know next year
Reply:Its because assigning a value and pointing to a variable are two different things. Its kind of like what the 1st person said.
For ex: point = %26amp;a1;
In this line, point is pointing to the variable a1.
Now try changing the value of a1 USING point.
ex:
*point = 5;
or
*point = 8;
or
*point = a2;
All will generate an error BECAUSE point was declared as a constant. Now try removing const from your declaration, all the above statements should execute correctly.
How to declare and initialize global variables in objective-c?
i know that we should declare it in .h and define it in .c, but i want some details about it.
thanks in advance
How to declare and initialize global variables in objective-c?
extern keyword can be used to declare the global variable
Reply:use extern keyword.
or declare it outside main() in the program.
thanks in advance
How to declare and initialize global variables in objective-c?
extern keyword can be used to declare the global variable
Reply:use extern keyword.
or declare it outside main() in the program.
Prove that the mapping F:C[0,1]->C[0,1] dfnd by F(f)=q(x)f(x)+(0 to 1(defnt int)∫ p ((x)) f (x)) dx,((where
Prove that the mapping F:C[0,1]-%26gt;C[0,1] defined by F(f)=q(x)f(x)+(0 to 1(defnt int)∫ p ((x)) f (x)) dx,((where
q, p ∈ C[0, 1] are given fixed functions )), is contunious
Prove that the mapping F:C[0,1]-%26gt;C[0,1] dfnd by F(f)=q(x)f(x)+(0 to 1(defnt int)∫ p ((x)) f (x)) dx,((where
We need to prove that for any f ∈ C[0,1] and any ε %26gt; 0 there exists a δ %26gt; 0 such that if ||f - g|| %26lt; δ for any g ∈ C[0, 1] then ||F(f) - F(g)|| %26lt; ε. So let f ∈ C[0,1] and ε %26gt; 0.
Note: in the following, all integrals are from 0 to 1, but I won't write this explicitly because it's awkward in text.
Now for g ∈ C[0,1] we have
F(g) - F(f) = (q(x)g(x) + ∫ (p(x) g(x)) dx) - (q(x)f(x) + ∫ (p(x) f(x)) dx)
= q(x) (g(x) - f(x)) + ∫ (p(x) (g(x) - f(x))) dx
By the triangle inequality, ||F(g) - F(f)|| %26lt;= ||q(x) (g(x) - f(x))|| + ||∫ (p(x) (g(x) - f(x))) dx||
%26lt;= ||q(x)|| ||g(x) - f(x)|| + ||p(x)|| ||g(x) - f(x)|| . 1
(note that all norms here are in C[0, 1] and not in the complex numbers; that is, they are function norms, not pointwise)
= ||g - f|| (||q|| + ||p||)
Hence, choose δ = ε / (||q|| + ||p||). Then if ||g - f|| %26lt; δ, ||F(g) - F(f)|| %26lt; δ (||q|| + ||p||) = ε as required.
Reply:What areas aren't clear? Email me and I can help you out further. Report It
q, p ∈ C[0, 1] are given fixed functions )), is contunious
Prove that the mapping F:C[0,1]-%26gt;C[0,1] dfnd by F(f)=q(x)f(x)+(0 to 1(defnt int)∫ p ((x)) f (x)) dx,((where
We need to prove that for any f ∈ C[0,1] and any ε %26gt; 0 there exists a δ %26gt; 0 such that if ||f - g|| %26lt; δ for any g ∈ C[0, 1] then ||F(f) - F(g)|| %26lt; ε. So let f ∈ C[0,1] and ε %26gt; 0.
Note: in the following, all integrals are from 0 to 1, but I won't write this explicitly because it's awkward in text.
Now for g ∈ C[0,1] we have
F(g) - F(f) = (q(x)g(x) + ∫ (p(x) g(x)) dx) - (q(x)f(x) + ∫ (p(x) f(x)) dx)
= q(x) (g(x) - f(x)) + ∫ (p(x) (g(x) - f(x))) dx
By the triangle inequality, ||F(g) - F(f)|| %26lt;= ||q(x) (g(x) - f(x))|| + ||∫ (p(x) (g(x) - f(x))) dx||
%26lt;= ||q(x)|| ||g(x) - f(x)|| + ||p(x)|| ||g(x) - f(x)|| . 1
(note that all norms here are in C[0, 1] and not in the complex numbers; that is, they are function norms, not pointwise)
= ||g - f|| (||q|| + ||p||)
Hence, choose δ = ε / (||q|| + ||p||). Then if ||g - f|| %26lt; δ, ||F(g) - F(f)|| %26lt; δ (||q|| + ||p||) = ε as required.
Reply:What areas aren't clear? Email me and I can help you out further. Report It
Help with C# Function Reference Declaration Error???????????
please please help my friend with this if you can hes been working so hard on this but hes stuck :/
I am trying to write a C# program for class and I know very little about C#. I have defined my function below the includes:
void Echo_Keypress(ulong_t arg);
and I am using my function later in the program:
static void Echo_Keypress(ulong_t arg)
{
//do stuff
}
This is the error I am getting:
main.c: (.text+0x9a): undefined reference to `Echo_Keypress'
Does anyone know how to get around this error? Any help/info is greatly appreciated
Help with C# Function Reference Declaration Error???????????
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace jijo
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
System.Windows.Forms.MessageBox.Show("Yo... press the key " + e.KeyCode.ToString());
}
}
}
Reply:Which of the two occurences of your function do you get the error on? I don't think in C# you have to declare a function like you would have to in C++.
Reply:See:
http://www.yoda.arachsys.com/csharp/para...
for the following topics:
Preamble: what is a reference type?
Further preamble: what is a value type?
Checking the preamble...
The different kinds of parameters
Value parameters
Reference parameters
Output parameters
Parameter arrays
Mini-glossary
Hope this helps.
Reply:Hi, You need not to declare your function as;
void Echo_keypress(ulong_t arg);
This is done normally in C++ or C style programming where you can declare functions before and give their definitions later on.
You just need to put your definition only, i.e.
static void Echo_keypress(ulong_t arg0
{
//do stuff
}
Also, as you are creating it as static, you will have to call it through class name directly, instead of creating a object first...
I am trying to write a C# program for class and I know very little about C#. I have defined my function below the includes:
void Echo_Keypress(ulong_t arg);
and I am using my function later in the program:
static void Echo_Keypress(ulong_t arg)
{
//do stuff
}
This is the error I am getting:
main.c: (.text+0x9a): undefined reference to `Echo_Keypress'
Does anyone know how to get around this error? Any help/info is greatly appreciated
Help with C# Function Reference Declaration Error???????????
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace jijo
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
System.Windows.Forms.MessageBox.Show("Yo... press the key " + e.KeyCode.ToString());
}
}
}
Reply:Which of the two occurences of your function do you get the error on? I don't think in C# you have to declare a function like you would have to in C++.
Reply:See:
http://www.yoda.arachsys.com/csharp/para...
for the following topics:
Preamble: what is a reference type?
Further preamble: what is a value type?
Checking the preamble...
The different kinds of parameters
Value parameters
Reference parameters
Output parameters
Parameter arrays
Mini-glossary
Hope this helps.
Reply:Hi, You need not to declare your function as;
void Echo_keypress(ulong_t arg);
This is done normally in C++ or C style programming where you can declare functions before and give their definitions later on.
You just need to put your definition only, i.e.
static void Echo_keypress(ulong_t arg0
{
//do stuff
}
Also, as you are creating it as static, you will have to call it through class name directly, instead of creating a object first...
Meaning of "c/o price".?
When telling me the price for an item I want to import from the USA, they define it as "C/O price"
What is the meaning of it?
Thanks
Meaning of "c/o price".?
It is the Cost of price. Means you pay the cost of shipping.
Reply:Thank you very much. I imagine that means that the cost of placing the goods on a ship (FOB) are not included. Report It
What is the meaning of it?
Thanks
Meaning of "c/o price".?
It is the Cost of price. Means you pay the cost of shipping.
Reply:Thank you very much. I imagine that means that the cost of placing the goods on a ship (FOB) are not included. Report It
If the dictionary carried the "C" word, would sHrillery's picture be attached to it?
I can't think of a better word that personifies a dirty, lying, evil politician, like her.
She would always sell out her own socialists, if she thought it would help her to sustain or gain more power and control.
Do you think sHrillery defines the "C" word?
If the dictionary carried the "C" word, would sHrillery's picture be attached to it?
A VERY "BIG ONE"
Reply:I am not voting for Hillary Clinton, but I don't think one should stoop to personal attacks on anyone.
Reply:Possibly.
Who is Ron Paul?
Reply:No. But the "B" word, maybe. Probably. For sure.
Vote for Rudy!
Reply:the c word is a loose vagina. if shes a loose vagina... then i guess it would.
Reply:I agree 1000%
She is a person that needs to be watched ans all the curption her and her husband have been involved in.
Reply:It does in my dictionary.
Reply:Commander in Chief ? ... No way !!!
Reply:How about Bush. He's dirty, a liar and evil. Is he a c**t?
Females should not use words like this against other females your fighting against yourself.
Reply:Commander-in-Chief, absolutely!
(Your question is childish and lacks moral character).
Reply:Right below yours.
Reply:No the C word is reserved for the sign under your mirror.
covent garden
She would always sell out her own socialists, if she thought it would help her to sustain or gain more power and control.
Do you think sHrillery defines the "C" word?
If the dictionary carried the "C" word, would sHrillery's picture be attached to it?
A VERY "BIG ONE"
Reply:I am not voting for Hillary Clinton, but I don't think one should stoop to personal attacks on anyone.
Reply:Possibly.
Who is Ron Paul?
Reply:No. But the "B" word, maybe. Probably. For sure.
Vote for Rudy!
Reply:the c word is a loose vagina. if shes a loose vagina... then i guess it would.
Reply:I agree 1000%
She is a person that needs to be watched ans all the curption her and her husband have been involved in.
Reply:It does in my dictionary.
Reply:Commander in Chief ? ... No way !!!
Reply:How about Bush. He's dirty, a liar and evil. Is he a c**t?
Females should not use words like this against other females your fighting against yourself.
Reply:Commander-in-Chief, absolutely!
(Your question is childish and lacks moral character).
Reply:Right below yours.
Reply:No the C word is reserved for the sign under your mirror.
covent garden
Write a program In C++ which contains a user defined function named multiple.?
Write a program In C++ which contains a user defined function named multiple. This function takes two integers values and determines whether the second integer is a multiple of the first. The function should take two integer arguments and return 1 (true) if the second is a multiple of the first and 0 (false) otherwise.
Call this function in a main program after getting two integers from user.
Output:
Enter first number : 4
Enter second number : 16
16 is multiple of 2
Write a program In C++ which contains a user defined function named multiple.?
I don't get it... In your example, you entered 4 and 16. Why did the output say 16 is a multiple of 2.
Oh, there's some trickery going on... The function should then also determine if the second number is a multiple of half of the first number as well as the first number?
Tell your instructor that he has an error in his example and meybe you won't have to write your assignment.
Reply:Resend your question here:
http://answers.yahoo.com/dir/;_ylt=Al7H4...
Reply:The modulo function, %, is perfect for that. 9 modulo 3 is zero (not remainder so a multiple of three). 10 modulo 3 is 1, so 10 is not a multiple.
Call this function in a main program after getting two integers from user.
Output:
Enter first number : 4
Enter second number : 16
16 is multiple of 2
Write a program In C++ which contains a user defined function named multiple.?
I don't get it... In your example, you entered 4 and 16. Why did the output say 16 is a multiple of 2.
Oh, there's some trickery going on... The function should then also determine if the second number is a multiple of half of the first number as well as the first number?
Tell your instructor that he has an error in his example and meybe you won't have to write your assignment.
Reply:Resend your question here:
http://answers.yahoo.com/dir/;_ylt=Al7H4...
Reply:The modulo function, %, is perfect for that. 9 modulo 3 is zero (not remainder so a multiple of three). 10 modulo 3 is 1, so 10 is not a multiple.
What is Variable and what are rules for defining a variable in C/C++.?
What is Variable and what are rules for defining a variable in C/C++.
What is Variable and what are rules for defining a variable in C/C++.?
Variables are like containers or holders of values. If you want to save an integer somewhere you have to assign it to a variable as such:
int someInteger = 4;
Now, here are some rules for defining a variable in C++:
1) The declaration of a variable consists of three parts (the type of the variable, the name of the variable, and the value you are assigning to the variable)
2) The name of the variable can't be a reserved word such as (string, int, double, this, class, main, return, etc.)
3) The value you assign to the variable has to be of the same type as the variable itself. Here are examples:
int a = 7; // this is good
double k = 2.4; // this is good
int c = 5.6; // this is bad because you are assigning a
// double to a variable of type int (integer)
Reply:a variable is like a box that contains a specific value,
u can use it or modify it.
there r 2 types of variable : global and local
and there r variables that can be as parameters that enter %26amp; leave a specific function.
Reply:The dictionary defines variable as
adjective:-
likely to change frequently:
or
noun [C] SPECIALIZED
a number, amount or situation which can change:
In computing terms a variable is a predefined type of memory allocation that can and probably will change its value.
Reply:variable is name of a block of memory address
Reply:there's a tutorial on www.functionx.com for C/C++
email cards
What is Variable and what are rules for defining a variable in C/C++.?
Variables are like containers or holders of values. If you want to save an integer somewhere you have to assign it to a variable as such:
int someInteger = 4;
Now, here are some rules for defining a variable in C++:
1) The declaration of a variable consists of three parts (the type of the variable, the name of the variable, and the value you are assigning to the variable)
2) The name of the variable can't be a reserved word such as (string, int, double, this, class, main, return, etc.)
3) The value you assign to the variable has to be of the same type as the variable itself. Here are examples:
int a = 7; // this is good
double k = 2.4; // this is good
int c = 5.6; // this is bad because you are assigning a
// double to a variable of type int (integer)
Reply:a variable is like a box that contains a specific value,
u can use it or modify it.
there r 2 types of variable : global and local
and there r variables that can be as parameters that enter %26amp; leave a specific function.
Reply:The dictionary defines variable as
adjective:-
likely to change frequently:
or
noun [C] SPECIALIZED
a number, amount or situation which can change:
In computing terms a variable is a predefined type of memory allocation that can and probably will change its value.
Reply:variable is name of a block of memory address
Reply:there's a tutorial on www.functionx.com for C/C++
email cards
Suppose T in L(C^3) is defined by T(Z1,Z2,Z3)=(Z2,Z3,0). Prove that T has no square root.?
More precisely, Prove that there does not exist S in L(C^3) such that S^2=T.
Suppose T in L(C^3) is defined by T(Z1,Z2,Z3)=(Z2,Z3,0). Prove that T has no square root.?
Suppose there was such an S. Then:
S^2 (Z1,Z2,Z3) = (Z2,Z3,0)
which implies S^6 (Z1,Z2,Z3) = (0,0,0), or in other words S^6 = 0. Therefore the minimal polynomial of S must divide x^6, and so must be either x^3, x^2, or x (since it's degree is at most 3 by that theorem that every matrix satisfies its own characteristic polynomial). Thus it must be the case that S^3 = 0, and so S^4 = 0 as well. However S^4 = T^2, which is not zero so this is a contradiction.
Suppose T in L(C^3) is defined by T(Z1,Z2,Z3)=(Z2,Z3,0). Prove that T has no square root.?
Suppose there was such an S. Then:
S^2 (Z1,Z2,Z3) = (Z2,Z3,0)
which implies S^6 (Z1,Z2,Z3) = (0,0,0), or in other words S^6 = 0. Therefore the minimal polynomial of S must divide x^6, and so must be either x^3, x^2, or x (since it's degree is at most 3 by that theorem that every matrix satisfies its own characteristic polynomial). Thus it must be the case that S^3 = 0, and so S^4 = 0 as well. However S^4 = T^2, which is not zero so this is a contradiction.
Sunday, July 12, 2009
How do we make (#define) in Java ?
In C++, we use #define to define macros. How can we do it in Java ?
Can it be used as function like in C++? (for example : #define square(x)=(x)*(x) )
How do we make (#define) in Java ?
The define statment is a preprocessor statment that replace an argument with another argument.usually after #import.
I'll explain in C
EG.
#define print printf
#define x 16
#define y a+x
The complier find those argument that matches and convert them into the constant/alogrithm/string that was #define.
The closest that I can come to making a define statment in java is
private static final (int,long) that cause the agrument to be a contstant.
I use a class to provide for the alogrithm though.
If you know how to #define in java Please add in Details :)
Reply:you need an external preprocessor to be able to define in java. Report It
Can it be used as function like in C++? (for example : #define square(x)=(x)*(x) )
How do we make (#define) in Java ?
The define statment is a preprocessor statment that replace an argument with another argument.usually after #import.
I'll explain in C
EG.
#define print printf
#define x 16
#define y a+x
The complier find those argument that matches and convert them into the constant/alogrithm/string that was #define.
The closest that I can come to making a define statment in java is
private static final (int,long) that cause the agrument to be a contstant.
I use a class to provide for the alogrithm though.
If you know how to #define in java Please add in Details :)
Reply:you need an external preprocessor to be able to define in java. Report It
What disease b/c of a deficiency of vit. C is defined by bleeding gums & extreme weakness? syphillis/scurvy?
this is a question I got thru the internet %26amp; do not know the answer to %26amp; would like some help/input.
What disease b/c of a deficiency of vit. C is defined by bleeding gums %26amp; extreme weakness? syphillis/scurvy?
scurvy is the vit c issue. syphillis is a sexual transmitted infection
Reply:That is scurvy. Read more about it at WebMD below...
What disease b/c of a deficiency of vit. C is defined by bleeding gums %26amp; extreme weakness? syphillis/scurvy?
scurvy is the vit c issue. syphillis is a sexual transmitted infection
Reply:That is scurvy. Read more about it at WebMD below...
Which of the following views would you use to define a table, and specify the fields it will contain?
a. datasheets view
b. define view
c. design view
d. edit view
Which of the following views would you use to define a table, and specify the fields it will contain?
Microsoft actually suggests creating tables in Datasheet view:
http://office.microsoft.com/en-us/access...
Howver, you can also use the Design view to create a table.
A person with Access experience would almost certainly create a table in Design view, so C is probably the best answer; but A is also acceptable.
Reply:design view
Reply:c. design view
cheap flowers
b. define view
c. design view
d. edit view
Which of the following views would you use to define a table, and specify the fields it will contain?
Microsoft actually suggests creating tables in Datasheet view:
http://office.microsoft.com/en-us/access...
Howver, you can also use the Design view to create a table.
A person with Access experience would almost certainly create a table in Design view, so C is probably the best answer; but A is also acceptable.
Reply:design view
Reply:c. design view
cheap flowers
Use the properties of logarithms to evaluate the given expression in terms of A, B, and/or C?
Let A, B, and C be defined as follows:
log_b_2 = A
log_b_3 = B
log_b_5 = C
Problem: log_b_4th root of 60
Use the properties of logarithms to evaluate the given expression in terms of A, B, and/or C?
1) 4th root of 60 can be written as 60^(1/4) (exponent rules)
2) log_b 60^(1/4) = (1/4) log_b 60 (property of logs)
3) 60 = 2 * 30 = 2 * 2 * 15 = 2^2 * 3 * 5 (factorization)
4) so (1/4) log_b 60 = (1/4) log_b (2^2 * 3 * 5) (substitution)
5) log_b (2^2 * 3 * 5) = log_b 2^2 + log_b 3 + log_b 5 (property of logs)
6) log_b 2^2 = 2 log_b 2 (property of logs, same as #2)
7) putting it all together, we have
log_b 60^(1/4) = (1/4)[2*log_b 2 + log_b 3 + log_b 5]
but log_b 2 = A, log_b 3 = B, log_b 5 = C, so substitute these in to get:
log_b 60^(1/4)
= (1/4)[2*log_b 2 + log_b 3 + log_b 5]
= (1/4)[2*A + B + C]
Reply:problem:log_b_60^(1/4)
this is equal to: 1/4(log_b_60)
60 = 5 x 3 x 2^2
1/4(log_b_(5x3x2^2)) = 1/4(log_b_5 + log_b_3 + log_b_2^2) = 1/4 (log_b_5 + log_b_3 +2*log_b_2) = 1/4 (C + B + 2A)
hope this helps!
Reply:60 = 2^2 * 3 * 5
log[b]( 60^(1/4) ) =
1/4 log[b](60) =
1/4 ( 2A + B + C)
log_b_2 = A
log_b_3 = B
log_b_5 = C
Problem: log_b_4th root of 60
Use the properties of logarithms to evaluate the given expression in terms of A, B, and/or C?
1) 4th root of 60 can be written as 60^(1/4) (exponent rules)
2) log_b 60^(1/4) = (1/4) log_b 60 (property of logs)
3) 60 = 2 * 30 = 2 * 2 * 15 = 2^2 * 3 * 5 (factorization)
4) so (1/4) log_b 60 = (1/4) log_b (2^2 * 3 * 5) (substitution)
5) log_b (2^2 * 3 * 5) = log_b 2^2 + log_b 3 + log_b 5 (property of logs)
6) log_b 2^2 = 2 log_b 2 (property of logs, same as #2)
7) putting it all together, we have
log_b 60^(1/4) = (1/4)[2*log_b 2 + log_b 3 + log_b 5]
but log_b 2 = A, log_b 3 = B, log_b 5 = C, so substitute these in to get:
log_b 60^(1/4)
= (1/4)[2*log_b 2 + log_b 3 + log_b 5]
= (1/4)[2*A + B + C]
Reply:problem:log_b_60^(1/4)
this is equal to: 1/4(log_b_60)
60 = 5 x 3 x 2^2
1/4(log_b_(5x3x2^2)) = 1/4(log_b_5 + log_b_3 + log_b_2^2) = 1/4 (log_b_5 + log_b_3 +2*log_b_2) = 1/4 (C + B + 2A)
hope this helps!
Reply:60 = 2^2 * 3 * 5
log[b]( 60^(1/4) ) =
1/4 log[b](60) =
1/4 ( 2A + B + C)
Define center ,nomalizer........?
3.If G is a group and H is a subgroup of G and A is tha subset of G the Define :
1.C(G)(A)
2.NG (H)
3.If A=G then Ng(H) and CG(A).
Define center ,nomalizer........?
C_G(A) is called the centralizer of A in G and is the set of all elements in G that commute with all elements of A.
C_G(A)= { x in G | xa=ax for any a in A}
N_G(H) = { x in G | x H x^(-1) = H }
If A=G then C_G(G) = The center of group G
If A=G then N_G(G) = G
1.C(G)(A)
2.NG (H)
3.If A=G then Ng(H) and CG(A).
Define center ,nomalizer........?
C_G(A) is called the centralizer of A in G and is the set of all elements in G that commute with all elements of A.
C_G(A)= { x in G | xa=ax for any a in A}
N_G(H) = { x in G | x H x^(-1) = H }
If A=G then C_G(G) = The center of group G
If A=G then N_G(G) = G
Prove that every term of the sequence defined by b1=c b2=2c bk+1= 2bk+bk-1 is divisble by c?
prove that every term of the sequence defined by
b(1)=c
b(2)=2c
bk+1= 2bk+bk-1 is divisble by c
i know it's induction but i don't rember how exactly to prove it
Prove that every term of the sequence defined by b1=c b2=2c bk+1= 2bk+bk-1 is divisble by c?
Is there some part of the question you left out? This is, as you pointed out, a (generalized) induction argument:
Assume b_(k-1) and b_k are divisible by c, then 2b_k is divisible by c, so
b_(k+1) = 2b_k + b_(k_1)
is also divisible by c.
Since the induction assumptions are true for k=1,2, it is true for all positive integers k.
Reply:1) If a and b are both divisible by c, then a+b is divisible by c.
a = m*c, b = n*c, therefore (a+b) = (m+n)*c.
2) bk+1 = 2bk + bk-1
If bk and bk-1 are divisible by c, then bk+1 is also by 1).
3) b1 and b2 are divisible by c.
4) b3 is divisible by c by 2) and 3)
QED by induction.
b(1)=c
b(2)=2c
bk+1= 2bk+bk-1 is divisble by c
i know it's induction but i don't rember how exactly to prove it
Prove that every term of the sequence defined by b1=c b2=2c bk+1= 2bk+bk-1 is divisble by c?
Is there some part of the question you left out? This is, as you pointed out, a (generalized) induction argument:
Assume b_(k-1) and b_k are divisible by c, then 2b_k is divisible by c, so
b_(k+1) = 2b_k + b_(k_1)
is also divisible by c.
Since the induction assumptions are true for k=1,2, it is true for all positive integers k.
Reply:1) If a and b are both divisible by c, then a+b is divisible by c.
a = m*c, b = n*c, therefore (a+b) = (m+n)*c.
2) bk+1 = 2bk + bk-1
If bk and bk-1 are divisible by c, then bk+1 is also by 1).
3) b1 and b2 are divisible by c.
4) b3 is divisible by c by 2) and 3)
QED by induction.
Where I can find well defined C++ codes for all kinds of sorts .. like shell,merge,heap..etc ?
try theese
http://math.uc.edu/~pelikan/CODE/code.ht...
http://www.codeproject.com/
http://www.thefreecountry.com/sourcecode...
http://www.filelibrary.com/Contents/DOS/...
http://cplus.netfirms.com/
Where I can find well defined C++ codes for all kinds of sorts .. like shell,merge,heap..etc ?
U should purchase any book that explain Datastructure throw C++
Reply:Singapore National Library, look for the book:
Data Structures and Algorithm Analysis in C++
Algorithms in C++, Parts 1-4: Fundamentals, Data Structure, Sorting, Searching
Reply:http://search.yahoo.com/search?p=well+de...
maybe some of this will help
baseball cards
http://math.uc.edu/~pelikan/CODE/code.ht...
http://www.codeproject.com/
http://www.thefreecountry.com/sourcecode...
http://www.filelibrary.com/Contents/DOS/...
http://cplus.netfirms.com/
Where I can find well defined C++ codes for all kinds of sorts .. like shell,merge,heap..etc ?
U should purchase any book that explain Datastructure throw C++
Reply:Singapore National Library, look for the book:
Data Structures and Algorithm Analysis in C++
Algorithms in C++, Parts 1-4: Fundamentals, Data Structure, Sorting, Searching
Reply:http://search.yahoo.com/search?p=well+de...
maybe some of this will help
baseball cards
Write a simple C/C++ program which defines an array of five elements, then using pointer to display the addres
Write a simple C/C++ program which defines an array of five elements, then using pointer to display the addresses of all elements of the array.
Write a simple C/C++ program which defines an array of five elements, then using pointer to display the addres
#include %26lt;iostream%26gt;
using namespace std;
int main()
{
int array[5];
int* pointer = NULL;
for(int i = 0; i %26lt; 5; i++)
{
pointer = %26amp;array[i];
cout %26lt;%26lt; "The address of element (" %26lt;%26lt; i + 1 %26lt;%26lt; ") is: ";
cout %26lt;%26lt; %26amp;(*pointer);
}
return 0;
}
// you can also do it without using a pointer as follows:
for(int i = 0; i %26lt; 5; i++)
{
cout %26lt;%26lt; "The address of element (" %26lt;%26lt; i + 1 %26lt;%26lt; ") is: ";
cout %26lt;%26lt; %26amp;array[i];
}
Reply://C//or//C++
-------------------------------
Start
Define: /Array
Elements: /5
Now use:
What?
pointer to address the F* display
what for?
elements of the display?
how many?
5!!!
------------------------------
end
Reply:Any other help me to solve that Question
Reply:/* Tolga's C code */
#include %26lt;stdio.h%26gt;
int main(){
int i=0, arr[5];
for(;i%26lt;5;i++)
printf("Address of the element #%d is %p\n",i,(arr+i));
return 0;}
Reply:dude, that's not even a program. that's like 5 lines of code, if even.
Reply:#include%26lt;iostream.h%26gt;
#include%26lt;stdlib.h%26gt;
int main(){
int *p;
int a[5] = {1,2,3,4,5};
p = a; //simple assignment
for(int i = 0;i%26lt;5;i++)
cout%26lt;%26lt;(p+i);
return 0;
}
Reply:Do your own homework
Reply:Why dont you try your own Mind to Answer your Assignments, you are just sitting in your Campus to ask people to do Assignments for you, hmmmm
Very Bad Hafsa, Very Bad
Reply:/*-------hi dude: try this :its 100% right---------*/
/*-------it really takes something to learn pointers in c---*/
#include%26lt;stdio.h%26gt;
#include%26lt;conio.h%26gt;
void main()
{
int a[5] = {1,2,3,4,5};
int *i;
for( i = 0; i%26lt;=4; i++)
{
printf("\t%d",*(a+i));
}
getch();
}
Write a simple C/C++ program which defines an array of five elements, then using pointer to display the addres
#include %26lt;iostream%26gt;
using namespace std;
int main()
{
int array[5];
int* pointer = NULL;
for(int i = 0; i %26lt; 5; i++)
{
pointer = %26amp;array[i];
cout %26lt;%26lt; "The address of element (" %26lt;%26lt; i + 1 %26lt;%26lt; ") is: ";
cout %26lt;%26lt; %26amp;(*pointer);
}
return 0;
}
// you can also do it without using a pointer as follows:
for(int i = 0; i %26lt; 5; i++)
{
cout %26lt;%26lt; "The address of element (" %26lt;%26lt; i + 1 %26lt;%26lt; ") is: ";
cout %26lt;%26lt; %26amp;array[i];
}
Reply://C//or//C++
-------------------------------
Start
Define: /Array
Elements: /5
Now use:
What?
pointer to address the F* display
what for?
elements of the display?
how many?
5!!!
------------------------------
end
Reply:Any other help me to solve that Question
Reply:/* Tolga's C code */
#include %26lt;stdio.h%26gt;
int main(){
int i=0, arr[5];
for(;i%26lt;5;i++)
printf("Address of the element #%d is %p\n",i,(arr+i));
return 0;}
Reply:dude, that's not even a program. that's like 5 lines of code, if even.
Reply:#include%26lt;iostream.h%26gt;
#include%26lt;stdlib.h%26gt;
int main(){
int *p;
int a[5] = {1,2,3,4,5};
p = a; //simple assignment
for(int i = 0;i%26lt;5;i++)
cout%26lt;%26lt;(p+i);
return 0;
}
Reply:Do your own homework
Reply:Why dont you try your own Mind to Answer your Assignments, you are just sitting in your Campus to ask people to do Assignments for you, hmmmm
Very Bad Hafsa, Very Bad
Reply:/*-------hi dude: try this :its 100% right---------*/
/*-------it really takes something to learn pointers in c---*/
#include%26lt;stdio.h%26gt;
#include%26lt;conio.h%26gt;
void main()
{
int a[5] = {1,2,3,4,5};
int *i;
for( i = 0; i%26lt;=4; i++)
{
printf("\t%d",*(a+i));
}
getch();
}
Subscribe to:
Posts (Atom)