|
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...
|
|
|
|
|
Thanks a lot everyone, it's solved
|
|
|
|
|
You need to override the = opperator for the struct so that all the data is copied back.
Or use a pointer and pass it to the func, which is better, and a lot lighter on the stack.
|
|
|
|
|
Looking at the error there's probably a missing equality operator, but why's not obvious as we haven't got the full class definition.
And it's not better to pass a pointer rather than returning a value - a decent compiler C++98 compiler will implement NRVO which makes it just as efficient to return a value.
|
|
|
|
|
And the code ends up different to what you intend...
|
|
|
|
|
Hello community
I´m really interested in these subject, but i dont really how works implementation off ecc in hardware, did you ever did that for a hardware ecc with c++? ,could you show me maybe an example of a ecc implanted in hardware with c++?
Because im looking for a security for my hardware and i want to try ecc with c++ for my hardware ( µBIC).
Maybe anyone have a example code for a hardware with ecc in c++.
thx
|
|
|
|
|
|
Hi all,
I'm a newbie in Linux programming. I compile the "Hello world program" by means of gcc compiler in a Centos 6 host computer, with kernel 2.6.32. The command line used is gcc -static hello.c -ohello. Previously I have installed the GNUlibc (ver 2.12) in this computer.
The compile process is ok, and runs ok in the host computer (Pentium 4). When I copy the program to an embedded cpu with AMD GEODE LX800 processor and kernel 2.6.12, the running result is "error: illegal instruction"
I checked compile with different parameters in gcc command line: -mpc64, -m32, -march=i386, -march=geode with no results with any of them (compile is ok but running error "illegal instrucion")
I know a cross compiling is neccesary but don´t know the correct parameters to gcc to use
The code is as simple as this
main()
{
printf("Hello world\n");
}
|
|
|
|
|
i'm a new learner for C++
i want to use a easy software to practice
i need some advice...
|
|
|
|
|
Visual stadio will be ok 4 y
|
|
|
|
|
|
|
|
thx, i will try this software!
|
|
|
|
|
As an IDE, Visual C++ without doubt.
Plus I regularly use Notepad++ (use instead of notepad). Lightweight and cool.
"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.)"
|
|
|
|
|
my teacher advised us to use VC++
Notepad++ sounds cool!!
thanks for your advice!
|
|
|
|
|
Any time.
Best Regards !
"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.)"
|
|
|
|
|
Stay away from both codeblocks and NotePad++. Visual C++ Express provides everything you need, and it or its professional cousins, are the IDE of choice for most people who answer questions here.
Veni, vidi, abiit domum
|
|
|
|