|
gateway23 wrote: I knew general c/c++ & little bit of java .
well im not experianced programmer but I think Network Programming is very easy with Java. Database can also be handled easily, well its not that easy but still if you know a little bit about jave, you should be able to pick it up quickly.
Personally i like visual studio 200X to program database apps, i love ADO.NET type features. But i have never implemented network programming on VS 200X using C# or VB.
|
|
|
|
|
sir.. i want to complet my project in c/c++ language.
If you any idea idea on socket programming in c/c++ , please suggest me.
|
|
|
|
|
i don't know if i would be any help for you, however you can learn Socket from this site itself, as it have lot of article dealing with sockets.
and about payment gateway, you can read more about ISO 8583 format!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi, i would like to know how to Read byte from USB port and then write the data into file: Can someone help me on this
i have try to modify the ReadByte() but no data was shown. It shown
0.000
0.000
in my output file. I'm out of idea.
Attached the coding:
BOOL CSerialCom::ReadByte(BYTE &resp)
{
BYTE rx;
resp=0;
FILE *ofp;
DWORD dwBytesTransferred=0;
if (ReadFile (hComm, &rx, 1, &dwBytesTransferred, 0))
{
if (dwBytesTransferred == 1)
{
resp=rx;
ofp=fopen("BCISignal.txt","w+");
fprintf(ofp,"%lf\n",resp);
fclose(ofp);
return true;
}
}
return false;
}
FYI, in my hex code, i had configured buffer[4] to send 4 byte datafrom 2 channel. Now i need to read this buffer[4] one by one in SerialCom().
|
|
|
|
|
fprintf(ofp,"%lf\n",resp);
Why are you trying to format a single byte into a long double, it makes no sense? You should write the data as binary or format it into hex characters (with the X format specifier). However you have not really explained what your code is trying to do, so this may not be the actual solution you need.
Please also edit your post and put <pre></pre> tags around your code.
It's time for a new signature.
|
|
|
|
|
I am writing an application that outputs information to the standard output. Messages to the user can come from different process and so I use EnterCriticalSection to this. But I want a way through which the last process that outputs information can switch to the last screen information. The application is written in C++. Is it possible, if yes how do I do it.
I also want to know if the header file "process.h" is a Windows file or is part of the ANSI C/C++ standard header files. Thanks.
|
|
|
|
|
i have this problem someone can help me?
|
|
|
|
|
My guess is probably not.
|
|
|
|
|
Read and follow this[^]. Otherwise you will always get the answers you got from Rick or Walt. Who is supposed to help you when you don't explain what the problem is?
Edit: Corrected link
|
|
|
|
|
bad advice, your link is wrong.
|
|
|
|
|
|
Excellent advice.
|
|
|
|
|
The line between failure and success is so thin...
|
|
|
|
|
I have this solution, does it help? You should try explaining your problem otherwise noone will be able to tell you if they can help or not, not to mention being willing to...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
i have problem with file sql someone can help me please
|
|
|
|
|
Would you be willing to give us a hint as to what the problem might be? Or are we supposed to guess?
I apologize, but my psychic powers aren't 100% right now.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
|
can anybody let me how to postpone implementation of abstract class methods
#include<iostream>
using namespace std;
class abstrs
{
public:
virtual int add(int i,int j)=0;
virtual int Substract(int i,int j)=0;
};
class derieved : public abstrs
{
public :
virtual int add(int i,int c)
{
return 100;
}
};
int main()
{
derieved dr;
int count=dr.add(12,34);
cout<<g;
}
vikas da
|
|
|
|
|
If you don't, you won't be able to create an instance of derived. Derived will still be abstract. You'll have to derive another layer and define Subtract there.
Once you agree to clans, tribes, governments...you've opted for socialism. The rest is just details.
|
|
|
|
|
Thanks Tim,
so we need to have implementation of all methods defined in abstract class to the single derived class to instantiate the class.
am i right..?
vikas da
|
|
|
|
|
Yep - every pure virtual function in an abstract class needs to be implemented in a derived class or you won't be able to instantiate the derived class.
Cheers,
Ash
|
|
|
|
|
The best way of avoiding the need to implement member functions (C++ doesn't have methods) is to avoid deriving a class from an abstract class.
So the first thing to ask is... why are you writing code like you have in your main? Derived doesn't actually need to implement any abstract classes so just implement what you need to get your code compiling:
class adder
{
public:
int add( int i, int j ) const { return i + j; }
};
int main()
{
std::cout << adder().add( 12, 34 ) << std::endl;
}
You only need abstract classes as your code gets bigger and you want to start cutting down on the dependencies between lumps of code. You use abstract classes as a design tool to avoid most of your code needing to know what concrete types they're dealing with.
If on the other hand you've got an interface you need to implement to use a particular lump of code then you haven't got a lot of choice but to implement the member functions. You could take the Java route and implement a minimal class and then derive from that:
class adder
{
public:
virtual int add( int i, int j ) = 0;
};
class minimal_adder
{
public:
virtual int add( int, int ) { return 0; }
};
But that can turn into a maintenance nightmare (you have to look at two implementations to find out where a member function is implemented, not just one. It gets worse when some wit adds another level, then another...).
So the points here are:
- Don't use an abstract class until you need to, never do it "just in case" [1]
- When you create abstract classes try and create them from the existing interface of a concrete class. You'll at least know there's client code (and unit tests) ready to use your new abstract class against
- Only use Java style stub implementations as a last resort (some chunk of client code is expecting an interface with 30 member functions, half of which you have no idea what the contracts are)
Cheers,
Ash
[1] Needing to includes using one as a firewall between code you're writing and code your colleagues are writing. If you sit down with a co-worker that needs a service from code you're writing hack out a quick interface together, stub implement it for them and then take your time implementing it properly.
|
|
|
|
|
In addition to the replies here, even though you have to implement all abstract functions, there is still a chance you can get a 'Pure virtual function call' runtime error.
You can find an example here[^] and some additional info.
|
|
|
|
|
Thanks for all your replies
i got my answer...
have a nice time ...
vikas da
|
|
|
|
|
Can be prevented CD copy by intercepting the systen copy function?
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|