|
hello friends ..,,,
I want c# code for implement vedio cutter in my desktop application.
vedio cutter with full feature like play, start clip,stop clip,pause,cut and progress bar.
|
|
|
|
|
This is the C++ forum. You can try the C#[^] forum.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
sushilabhanvar wrote: c# code for implement vedio cutter
Actually, those are just typos. Fixed post:
C++ code for implement video cutter, urgentz, plz plz.
(You know C# is just a typo of C++ ... )
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi guys,
i don't have much experience in network programming but i want to code a little rcon
tool for quake3 engine-based games like Call of Duty 2 or Call of Duty 4.
After much googling i found out that the rcon protocol of CoD2 has a 4 Byte long header
(0xFF each) and then the code, terminated with "\n".
For the connection i used a Winsock UDP connection.
But when i send something to a server it just responses "disconnect".
Can someone tell me how to create a packet that is needed for this in C++?
Greats Sebi.s
|
|
|
|
|
I found this: Q3 WebRCON[^], by googling. It looks like martian to me. But, I would guess that the server you connect to is expecting a proprietary message format.
This is: The TCP/IP Guide[^], a really useful reference if you don't anything about TCP/IP.
modified on Saturday, April 4, 2009 5:30 PM
|
|
|
|
|
hi,
thank you for the documentation. Now i know how a UDP datagramm is constructed, but how can i implement this in c++? Do i have to store everything in a char-array and then send it with the sendto() function?
|
|
|
|
|
I have no knowledge of the RCON operation, but, I would guess that there are a series of specifically formatted packets that your server expects to see, just to initialize whatever RCON protocol exists. That's what you really need to know. If it was me, I'd contact them and ask them.
|
|
|
|
|
Sebastian Schlecht wrote: thank you for the documentation. Now i know how a UDP datagramm is constructed, but how can i implement this in c++? Do i have to store everything in a char-array and then send it with the sendto() function?
Either a char-array or a struct that you are absolutely sure has the correct layout. You may need to turn off struct alignment etc with #pragma pack.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
HI ,
My name is srivas.. doing my final year engg.. we are developin an application in vc++2005.. i need help on how t use keyboard on the dialog box.. i have used pre translate msg with wm_keydown method.. we want further inforamation how t use these controls on MFC dialog.and i want some kind of color change or an highlight on the correspondin button on the MFC DIALOG. we look forward t ur reply asap.. thankin u..
srivas
Forward Message
|
|
|
|
|
The ideal way would be to read a book on MFC.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
spidrman102 wrote: i need help on how t use keyboard on the dialog box..
Care to elaborate?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Hi There.
I am using sone 3rd party libraries and am able to successfully Debug build my application.
Now, when I try to Release build the same piece of code, I am getting below error messages. Let me list few of them...
error C2146: syntax error : missing ';' before identifier 'HOPTIONSET'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2065: 'VWCALLBACKPROC' : undeclared identifier
......................................
......................................
......................................So On....
Please provide some pointers/suggestions for the same.
Thanks
PanB
|
|
|
|
|
Make sure that your project options are the same for debug and release (concerning the include directories, the lib directories, additional dependencies, ...). In brief: everything you changed in the configuration for debug mode should also be done for the release mode.
|
|
|
|
|
I have crossed checked them, they are absolutely similar to each other. Any other pointer/suggestion will be really helpful. Thanks.
|
|
|
|
|
Then look through the headers, looking for lines like:
#ifdef DEBUG
struct _some_struct_that_the_compiler_can't_find_in_release_
{
int evil;
};
#endif
I hope that made the point.
Don't read the whole thing by eye - get the computer to search for terms from the error messages, and then read up from there.
Hope that helps,
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Thanks for the reply guys.
BAD NEWS>
I have cross checked project settings - Debug/Release i.e.,
(a)C/C++ > Additional Include Directories
(b)Linker > General > Additional Library Directories
Linker > Input > Additional Dependencies
Should I need to check some other property apart from mentioned above?
Also, I am not able to find DEBUG in my full code/solution.
Just want to know, I am using same 3rd party dlls/libs for Debug/Release mode. Can they create this type of problem?
Thanks
PanB
|
|
|
|
|
Guys just an update >>>>
If I copy Preprocessor Defn and Runtime Library settings from Debug and copy them for Release, then I got success with Release Build but at the time execution my application just blow up....
Any clues, What I can do at the minimal level to make my Release build a success and also can execute my Release type application.
Thanks
PanB
|
|
|
|
|
Check the whole code out and look for uninitialized variables (specially local ones). For example you may have such a thing somewhere in your code:
CString strVariable ;
instead of:
CString strVariable = _T("");
|
|
|
|
|
I must admit the title is NOT clear at all.
As you know, using spy++ you can inspect messages sent to a specific widow in a human-favor manner. Now suppose you have a program being debugged and there's a variable representing a few properties. See the following variable contains BOLD, ITALIC and UNDERLINE status of a character:
DWORD dwFlags;
...
if (dwFlags & BOLD)
{
}
...
dwFlags |= ITALIC;
...
But my problem is this variable looks like some thing like 0x2F284A08 in the debug window and it's difficult to say which flags are set at the moment. Could you show a better way to consider this kind of variables?
Thank you masters!
|
|
|
|
|
I have been working on this program problem for days. I am not good at this infact I am almost illiterate to the subject. I am taking a c++ class as a requirement for my math ed degree. However,I have gotten lost on the past few assignmetns and only have a couple more to go. This is the last and only Programming class that I need. Can someone please help me with this one?
Thanks in advance and havea blessed day!
///*****************************************************************
//This program will converts your weight on the sister planets!
//*****************************************************************
#include <fstream>
#include <iostream>
#include <iomanip>
using namespace std;
int choice;
float Weight;
namespace planet
bool dataok;
{
int main();
planet =0;
cout <<"Please enter your weight in pounds" <<
cin << Weight;
cout << "Please enter the case number of the planet you wish to find your weight on">> endl;
cin << "planet"<< endl;
planet == "Mercury 1" || planet == "Venus 2" || planet == "Earth 3" || planet == "Moon 4" ||
planet == "Mars 5" || planet == "Jupiter 6" || planet == "Saturn 7" ||
planet == "Uranus 8" || planet == "Neptune 9" || planet == "Pluto 10")
switch(choice)
case 1: planet = "Mercury";
multiplier = .4155;
break;
case 2: planet = "Venus";
multiplier = .8975;
break;
case 3: planet = "Earth";
multiplier = 1;
break;
case 4: planet = "Moon";
multiplier = .166;
break;
case 5: planet = "Mars";
multiplier = .3507;
break;
case 6: planet = "Jupiter";
multiplier = 2.5374;
break;
case 7: planet = "Saturn";
multiplier = 1.0677;
break;
case 8: planet = "Uranus";
multiplier = .8947;
break;
case 9: planet = "Neptune";
multiplier = 1.1794;
break;
case 10: planet = "Pluto";
multiplier = .0899;
break;
system ("pause");
return 0;
endl;
}
|
|
|
|
|
angel.monkey wrote: cin >> "planet"<< endl;
panet must be an array of type char.
angel.monkey wrote: {
int main();
int main()
{
...
}
angel.monkey wrote: planet == "Mercury 1"
you can not compare strings in this way
angel.monkey wrote: switch(choice)
case
switch(...)
{
and thousands more ...
Thank you masters!
|
|
|
|
|
Thanks but I still do not understand. I am very lost when it comes to things like this. Thank you anyway and have a wonderful night!
|
|
|
|
|
Jusef has already coverted many points in your software. I'll point to just one:
{
int main();
I can easily imagine making this sort of silly mistake when writing the code - I've made soft daft ones in the last few days. But it really should not need external assistance to solve this problem.
OK, two problems:
switch(choice)
case 1:
If your teacher is in any way competent, you will have been shown working programs you can look to see how to start a console program - or to define any function at all. Similarly, if you haven't seen a switch statement before you probably don't need to use it to solve your homework.
If you've done past assignments, surely you must have handed them in for assessment. You do say you got lost - but didn't your teacher show you the way? Or couldn't you ask one of your fellow students to help you?
The compiler itself will help you, as long as your program makes a small amount of sense. It can produce very helpful error messages. At the moment it probably just says: ERROR1: HUH?
I think most people could go through your program and give you a working version but:
a/ This would not help you learn - only your efforts and one to one time with your teacher or a student getting better marks will. Bribe them with a beer for their time! (Or some other not-really-a-bribe-but-shows-thanks thing)
b/ If you've been that badly lost that you can't even start a function in your previous assignments, and you suddenly produced a working program, I bet your teacger would want to know why. Your teacher can use the internet too... And I bet you found codeproject somewhere...
c/ If you were lucky, and it helped you pass without fully understanding what you were doing, I'd feel sorry for any future employer relying on your programming skills. I know you're doing a math degree - and I also know a lot of modern math relies on software. This is a skill you need. You don't need to be expert - you do need to be competent.
4/ Buy a basic book! Go to the library and borrow one... Visit a friend and sneak a peek at theirs!
5/ If your teacher is so bad that all of the class is at this level by the end of the course, and they're unapproachable to help, then speak to their boss.
6/ Lastly, and you won't like this... If you've spent a semester going to class, and you really need help with this program, and the teacher has been slightly OK, then maybe you *should* fail this class. When you join the real world, people will expect you to deliver, or in the end you starve.
I can see three possibilities:
a) You can redo this class another time, but this time you'll pay more attention to the examples and code shown in the early days of the class, so you will get great marks in your class and move on with some humility
b) You doing pretty well in your other classes. You can't resit this class, but it's only a minor part of your overall degree. Move on, and work extra hard in other areas of your study. Don't mention programming skills on your CV.
c) You are doing badly in your other classes, and failing this will be enough to tip your grades over the edge. This will not come as a surprise to you. In which case, why on earth are you leaving it till this late in your course to ask for help, and why not someone closer?
I'm sorry if this ended up a bit rant-y, but this forum isn't really the place to get your answers - you need someone a lot more local and interactive - someone who can use pend and paper and refer to the material you should have already learnt.
I wish you success though!
Iain.
ps, If it makes you feel better, I still remember thinking that:
switch (Planet)
{
case "Earth":
planetnum = 3;
break;
should have worked! I've long since worked out why not, but we all started once!
Modified: Added harsh point 6.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Since you say you've been trying it for days, I'll give you a solution. But try and understand where you've gone wrong.
#include <iostream>
using namespace std;
#define PLANET_MERCURY 1
#define PLANET_VENUS 2
int main (void)
{
float fMultiplier = 1, fWeight = 1;
unsigned int nPlanet = 0;
cout<<"Please enter your weight"<<endl;
cin>>fWeight;
cout<<"Please choose a planet from the following (enter corresponding number)"<<endl;
cout<<"1. Mercury"<<endl<<"2. Venus"<<endl;
cin>>nPlanet;
switch(nPlanet)
{
case PLANET_MERCURY: fMultiplier = 0.4155;
cout<<"Your weight in Mercury is: ";
cout<<fWeight*fMultiplier<<endl;
break;
case PLANET_VENUS: fMultiplier = 0.8975;
cout<<"You weight in Venus is: ";
cout<<fWeight*fMultiplier<<endl;
break;
default: cout<<"Invalid choice!"<<endl;
break;
}
return 0;
}
Try to understand how the program works and then you can do it for the rest of the planets. You're still just beginning and you can very well read up a book. Master the fundamentals well and now. Or, you'll have trouble later.
Not the usage of >> with cin and << with cout . Note the switch cases enclosed in braces { } and can have a default case handler too.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
You're a gentler person than I am... See my reply[^] for a harsher take.
If it was one or two daft mistakes, I'd have joined your camp.
Happy weekend,
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|