|
good day all ..
i need only to get any voltage out from my laptop to control a relay
how to get a signal from a LAN port from any pin ?
in my laptop there is no com Port or lpt Port
also the usb port needs interfacing circuits which is not nessesary
in my simple project ... thats why i choosed the LAN Port
i use (visual basic 6) .. any help would much appriciated .
|
|
|
|
|
coolerfantasy wrote: i use (visual basic 6) So why are you posting in the C++ forum?
In any case you need to research how signals are presented on LAN ports, which is a hardware issue.
Veni, vidi, abiit domum
|
|
|
|
|
you are right
i will repost in the vb forum .
|
|
|
|
|
As I said before this is a hardware issue, not a programming one.
Veni, vidi, abiit domum
|
|
|
|
|
I wanted to verify if I am right on this question for college class.
#6. Write a single statement that assigns the values 99, 100 and 88 to an integer array named TestScores. Use the C++ notation used for the “lotterynumbers” array. (4 points)
I came up with...
int TestScores[5];
TestScores[0] = 99;
TestScores[1] = 100;
TestScores[2] = 88;
Correct me if I am wrong
Thank you.
|
|
|
|
|
That's not a single statement.
Veni, vidi, vici.
|
|
|
|
|
That are in effect 4 statements.
You might want to read this: Initializing Aggregates[^].
What you are looking for is:
int TestScores[5] = { 99, 100, 88 };
Note that the remaining elements of the array are initialized with zero, so that the following is the same as the previous statement.
int TestScores[5] = { 99, 100, 88, 0, 0 };
0100000101101110011001000111001010000010
|
|
|
|
|
Thank you! I understand what I did wrong... i needed a single statement, not a multiple statement.
Thanks again.
|
|
|
|
|
with int array, you can do the following idiom.
TestScores[5] = { 99, 100, 88 }
// [3],[4] are initialized with 0
with char array, in addition to the grammar above, you can
wchar_t[4] = L"jac" ;
|
|
|
|
|
jackheroes wrote: // [3],[4] are initialized with 0 Not necessarily.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
that's 4 statements not a single one it is going to look something like this.
int array[3] = {99,100,88};
|
|
|
|
|
Hi I need help with Set Theory. I am in a Programming class in college and I don’t understand this question at all! If you could help me, I would appreciate it.
Write three statements about sets. The first defines set A with values 1, 2, 3, 4 and 5. The second defines set B with the values 2, 4, 6, 8 and 10. The third lists the union of sets A and B. (Use the uppercase letter U to signify union.)
Thank you
|
|
|
|
|
This has nothing to do with C++, and is not even a programming question, it's just mathematics. Use Google to search for "set theory" and learn from there. Alternatively you could try your college library.
Veni, vidi, abiit domum
|
|
|
|
|
I think I figured it out.
A = {1,2,3,4,5}
B = {2,4,6,8,10}
A U B = {1,2,3,4,5,6,8,10}
Correct me if I'm wrong.
|
|
|
|
|
You are correct.
Veni, vidi, vici.
|
|
|
|
|
|
hi sir....
I am not much familiar with c coding, but currently I want to develop a c program titled "Linux based file and folder browser"......
please help me for the same
regards
Atul
|
|
|
|
|
OK, so you want to develop a program, and you know its title. So exactly what help are you asking for? If you are expecting someone to give you the code for such a program then you will be disappointed.
Veni, vidi, abiit domum
|
|
|
|
|
Member 10329467 wrote: I am not much familiar with c coding... I would consider a file browser to be a medium-level project, maybe slightly less if you are ambitious and a self thinker.
Member 10329467 wrote: please help me... Be specific. Show the code you have and what it is (not) doing.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
First step then is to learn the basics of writing a C program.
By "browser" you presumably mean a graphical display so after you learn the basics then you would need to find and learn to use a C library that provides graphics.
|
|
|
|
|
You should get a C book and Read. And if you have specific problems, please post them here.
"If A is a success in life, then A=x+y+z. (Work is x; y is play; and z is keeping your mouth shut.)"
|
|
|
|
|
Hello all,
In my Header file:
class MyData
{
struct Fparams
{
int i;
bool flag;
};
}
Now in CPP file:
void MyData::GetData()
{
Fparams fParam;
fparam = AllData();
}
MyData::Fparams MyData::AllData()
{
Fparams fparam;
fparam.i = 5;
fparam.flag = true;
return fparam;
}
Now i get an error saying - error: no match for 'operator=' in fparam = AllData(); ........
What's wrong here? How can i fix this?
Thanks in advance.
|
|
|
|
|
Make your nested structure public and declare the member functions in your class first then see what happens.
|
|
|
|
|
Well one problem is that in the AllData() function, you're returning a struct that is declared inside the function itself.
This is no good because when the function exits, all the variables declared inside the function are destroyed, so you're returning something that no longer exists.
It would be better if you wrote it as:
void MyData::GetData()
{
Fparams fParam;
AllData(fParam);
}
Void MyData::AllData(Fparams& params)
{
params.i = 5;
params.flag = true;
}
The difficult we do right away...
...the impossible takes slightly longer.
modified 24-Oct-13 16:00pm.
|
|
|
|
|
You can return objects that are declared local to a function from a function. That's what copy constructors are for...
|
|
|
|