|
It's a very important function
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Makes perfect sense.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
hi i need the vc++ code that as to read chm file format.
thanks in advance
|
|
|
|
|
I hope the HTML Help SDK[^] may be of help to you.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi ,
Im new to VC++...May i know what"s the difference b/w MFC and vc++ and where to start with...
im planning to start with Programming windows with MFC (Jeff procise)..
Please correct me if im wrong...
|
|
|
|
|
Visual C++ may refer to the Microsoft C++ compiler, or even the IDE. You can think of it as C++ on windows. MFC is a c++ framework written around Windows APIs to make life easier. Wikipedia has separete entries for Visual C++[^] and MFC[^]. Give them a read.
p_1960 wrote: im planning to start with Programming windows with MFC (Jeff procise Prosise)..
That would be a very good start if you are good at object oriented programming, specifically C++. (But legend says that you must start off with Win API and then move forward to MFC, not that it is a rule though)
Good luck with your learning. It must be fun.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
When I Captured video from webcam up to 30 seconds ....avi file is taking upto 80 MB...How to reduce the size of .avi file in KB ..Plz Help me..
|
|
|
|
|
AVI compression looks like a viable option? There are video compression libraries on the internet (some with source code and samples).
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Dear All,
I have created a dll in vc and exported some function. How can get ordinal value from function name in vc? I searched on google but could not find the result which I was looking for.
Thanks
Manish
|
|
|
|
|
solve the following system:
2x1-x2=1
-xi+2xi+1=0, i=1,2,.....,n-2.
-xn-1+2xn=1.
Using a)thomas method,
b) Jacobi method,
c) SOR scheme (use w=1 (Gauss-Seidel), w=1.1, w=1.2, w=1.3, w=1.4, w=1.5).
Use intial approximation x^(0) e=10^-6. Limit the maximum number of iteration to N=500. Display the output in the following form:
Number of iteration for convergence:?
Solution:
x1=
x2=
.
x20=
|
|
|
|
|
I'm not doing your assignment for you - but Google[^] can help you find pages like this[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
Hi
If this is your problem:
2x1-x2=1 ...................[1]
-xi+2xi+1=0, i=1,2,.....,n-2. .....[2]
-xn-1+2xn=1 ......................[3]
solution:
from [1] you get:
x(2)= 2*x(1)-1
from [3] you get:
x(n-1) = 2*x(n) -1
from [2] you get:
n= ? : rem n value should be set
for j=1 to 50
rem 50 is max iterations set to.
for i=1 to n-2
if i=2 then
x(2)= 2*x(1)-1
end if
x(i)= 2*x(i+1)
next i
x(n-1) = 2*x(n) -1
next j
Remark: I hope I understood your problem, since the solution
correctness depends on that too.
If your your problem is not stated correctly, that
belongs to you.
I hope that I helped, if you need more let me know.
|
|
|
|
|
Alright, I'm trying to have my program, which was writting in C++ using Dev-Cpp 4.9.9.2, open a separate program.
I know this can be achieved throw the use of system() but I can't seem to get it to work right, I'm currently using the command line:
system("c:\\Program Files\\Internet Explorer\\iexplorer.exe"); I get the error "'c:\Program' is not recognized as an internal or external command, operable program or batch file."
|
|
|
|
|
- It's just a command line, as passed to CMD, so put double quotes around the path as it contains spaces:
system("\"c:\\Program Files\\Internet Explorer\\iexplorer.exe\"");
- Isn't it iexplore.exe, not iexplorer.exe?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks again Stuart really appreciating all the help you're giving me. That one worked perfect on the first try. I didn't know anything about double quotes until a little bit before i posted this issue. I looked up other examples on google and when I tried it with the double quotes before it told me the same issue. But having just tested it with the line still saying iexplorer instead of iexplore it gave the error again, so it looks like that was my issue.. really need to stop doing this at 2 am..
|
|
|
|
|
The message you showed, saying that 'c:\Program' wasn't recognised, is a giveaway that you're having issues with spaces in the command-line. If you see it in the future, that's what your issue will be...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
In my VC++ 8.0 project I got the following errors:
1>d:\development\glestold\source\shared_lib\sources\graphics\interpolation.cpp(19) : fatal error C1083: Cannot open include file: 'windef.h': No such file or directory
1>d:\development\glestold\source\shared_lib\include\platform\sdl\sdl_opengl.h(32) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
I searched and found those files in the PlatformSDK folder i.e
C:\Program Files\Microsoft Platform SDK\Include folder.
I included this and the corresponding lib path in the project settings.
Now I get a punch of errors in winnt.h file in which I didn't do any modifications(system file).
The list of errors in the winnt.h file are:
1>------ Rebuild All started: Project: GlestLib, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'GlestLib', configuration 'Debug|Win32'
1>Compiling...
1>stdafx.cpp
1>Compiling...
1>buffer.cpp
1>camera.cpp
1>context.cpp
1>font.cpp
1>font_manager.cpp
1>graphics_interface.cpp
1>interpolation.cpp
1>c:\program files\microsoft platform sdk\include\winnt.h(3857) : error C2146: syntax error : missing ';' before identifier 'ContextRecord'
1>c:\program files\microsoft platform sdk\include\winnt.h(3857) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft platform sdk\include\winnt.h(3857) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft platform sdk\include\winnt.h(8319) : error C2065: 'PCONTEXT' : undeclared identifier
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2146: syntax error : missing ')' before identifier 'ContextRecord'
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : warning C4229: anachronism used : modifiers on data are ignored
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2182: 'RtlCaptureContext' : illegal use of type 'void'
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2491: 'RtlCaptureContext' : definition of dllimport data not allowed
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2059: syntax error : ')'
1>c:\program files\microsoft platform sdk\include\winnt.h(9594) : error C3861: '__readfsdword': identifier not found
1>model.cpp
1>model_manager.cpp
1>particle.cpp
1>pixmap.cpp
1>c:\program files\microsoft platform sdk\include\winnt.h(3857) : error C2146: syntax error : missing ';' before identifier 'ContextRecord'
1>c:\program files\microsoft platform sdk\include\winnt.h(3857) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft platform sdk\include\winnt.h(3857) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft platform sdk\include\winnt.h(8319) : error C2065: 'PCONTEXT' : undeclared identifier
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2146: syntax error : missing ')' before identifier 'ContextRecord'
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : warning C4229: anachronism used : modifiers on data are ignored
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2182: 'RtlCaptureContext' : illegal use of type 'void'
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2491: 'RtlCaptureContext' : definition of dllimport data not allowed
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2059: syntax error : ')'
1>c:\program files\microsoft platform sdk\include\winnt.h(9594) : error C3861: '__readfsdword': identifier not found
1>quaternion.cpp
1>shader.cpp
1>shader_manager.cpp
1>texture.cpp
1>texture_manager.cpp
1>context_gl.cpp
1>font_gl.cpp
1>model_renderer_gl.cpp
1>opengl.cpp
1>Generating Code...
1>Compiling...
1>particle_renderer_gl.cpp
1>shader_gl.cpp
1>d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(98) : warning C4250: 'Shared::Graphics::Gl::VertexShaderGl' : inherits 'Shared::Graphics::Gl::ShaderGl::Shared::Graphics::Gl::ShaderGl::end' via dominance
1> d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(88) : see declaration of 'Shared::Graphics::Gl::ShaderGl::end'
1>d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(98) : warning C4250: 'Shared::Graphics::Gl::VertexShaderGl' : inherits 'Shared::Graphics::Gl::ShaderGl::Shared::Graphics::Gl::ShaderGl::load' via dominance
1> d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(86) : see declaration of 'Shared::Graphics::Gl::ShaderGl::load'
1>d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(98) : warning C4250: 'Shared::Graphics::Gl::VertexShaderGl' : inherits 'Shared::Graphics::Gl::ShaderGl::Shared::Graphics::Gl::ShaderGl::compile' via dominance
1> d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(87) : see declaration of 'Shared::Graphics::Gl::ShaderGl::compile'
1>d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(107) : warning C4250: 'Shared::Graphics::Gl::FragmentShaderGl' : inherits 'Shared::Graphics::Gl::ShaderGl::Shared::Graphics::Gl::ShaderGl::end' via dominance
1> d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(88) : see declaration of 'Shared::Graphics::Gl::ShaderGl::end'
1>d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(107) : warning C4250: 'Shared::Graphics::Gl::FragmentShaderGl' : inherits 'Shared::Graphics::Gl::ShaderGl::Shared::Graphics::Gl::ShaderGl::load' via dominance
1> d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(86) : see declaration of 'Shared::Graphics::Gl::ShaderGl::load'
1>d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(107) : warning C4250: 'Shared::Graphics::Gl::FragmentShaderGl' : inherits 'Shared::Graphics::Gl::ShaderGl::Shared::Graphics::Gl::ShaderGl::compile' via dominance
1> d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(87) : see declaration of 'Shared::Graphics::Gl::ShaderGl::compile'
1>text_renderer_gl.cpp
1>texture_gl.cpp
1>factory_repository.cpp
1>gl_wrap.cpp
1>platform_menu.cpp
1>platform_util.cpp
1>d:\development\glestold\source\shared_lib\sources\platform\sdl\platform_util.cpp(14) : fatal error C1083: Cannot open include file: 'glob.h': No such file or directory
1>socket.cpp
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(69) : error C2511: 'Shared::Platform::Socket::Socket(int)' : overloaded member function not found in 'Shared::Platform::Socket'
1> d:\development\glestold\source\shared_lib\include\platform\win32\socket.h(43) : see declaration of 'Shared::Platform::Socket'
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(81) : error C2039: 'close' : is not a member of '`global namespace''
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(81) : error C3861: 'close': identifier not found
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(89) : error C3861: 'ioctl': identifier not found
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(99) : error C2065: 'ssize_t' : undeclared identifier
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(99) : error C2146: syntax error : missing ';' before identifier 'bytesSent'
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(99) : error C2065: 'bytesSent' : undeclared identifier
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(107) : error C2146: syntax error : missing ';' before identifier 'bytesReceived'
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(107) : error C2065: 'bytesReceived' : undeclared identifier
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(115) : error C2146: syntax error : missing ';' before identifier 'err'
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(115) : error C2065: 'err' : undeclared identifier
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(124) : error C2065: 'F_SETFL' : undeclared identifier
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(124) : error C2065: 'O_NONBLOCK' : undeclared identifier
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(124) : error C3861: 'fcntl': identifier not found
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(243) : error C2664: 'setsockopt' : cannot convert parameter 4 from 'int *' to 'const char *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>thread.cpp
1>window.cpp
1>window_gl.cpp
1>sound.cpp
1>sound_file_loader.cpp
1>sound_interface.cpp
1>sound_player.cpp
1>checksum.cpp
1>conversion.cpp
1>leak_dumper.cpp
1>profiler.cpp
1>Generating Code...
1>Compiling...
1>properties.cpp
1>random.cpp
1>util.cpp
1>xml_parser.cpp
1>Generating Code...
1>Build log was saved at "file://d:\Development\GlestOld\GlestLib\Debug\BuildLog.htm"
1>GlestLib - 34 error(s), 8 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
How do I get around these errors?
I've already posted this in this forum at the following link:
http://www.codeproject.com/script/Forums/View.aspx?fid=1647&df=90&mpp=25&noise=3&sort=Position&view=Quick&fr=401#xx0xx[^]
The reason for reposting is, I couldn't reply to the members queries since I was on leave. Please help me.
|
|
|
|
|
trying doing "#include<windows>" and "#include<windef>"
When I first started using Microsoft Visual Studio 2008 I kept having issues in regards to using the .h or not. Online tutorials and some books would tell me that most if not all include files had to have the .h but my compiler would only work when they didn't. So, it might work, it might not. </windef></windows>
|
|
|
|
|
<blockquote class="FQ"><div class="FQA">gamefreak2291 wrote:</div>trying doing "#include<windows>" and "#include<windef>"</blockquote>
I changed the #include statements as you said: But it's not working. What else can be done? I've installed the Microsoft Platform SDK. Is it the suitable one for Visual C++ 2005. If not can u tell me the correct version?
|
|
|
|
|
Hello,
please help me to write a function rotate that will rotate the rectangle 45 degrees each time button is pressed
let say that rectangle values are as follows
rectangle[0].x=250.0;
rectangle[0].y=100.0;
rectangle[1].x=550.0;
rectangle[1].y=100.0;
rectangle[2].x=550.0;
rectangle[2].y=300.0;
rectangle[3].x=250.0;
rectangle[3].y=300.0;
i know that it should be something like
H2 = H·cosθ + W·sinθ
W2 = H·sinθ + W·cosθ
where H2 is the height of the rotated rectangles and W2 is the width.
i need an assistance in writing this function.. please help
|
|
|
|
|
1. Decide what point is to be the centre of rotation. Let's call it O, with co-ordinates (Xo, Yo).
2. Rotate each point of the rectangle, Pi, with co-ordinates (Xi, Yi), around O, producing a new point, Pi', with co-ordinates (Xi', Yi'). You do this using the following two identities:
Xi' = (Xi-Xo)cosθ - (Yi-Yo)sinθ
Yi' = (Xi-Xo)sinθ + (Yi-Yo)cosθ
You now have your rotated rectangle!
This page[^] may help.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
umm what i have in my code is something like:
px = (rectwidth/2); py = (rectheight/2);
so i assume that they represent my center through which i want to rotate my rectangle (px, py)
however, i am not sure how to represent all of the point of the rect to be Xi Yi
considering that my rectangle representaion is as mentioned in the previous post with co-ordinates of
(250, 100) is rectangle[0]
(550, 100) is rectangle[1]
(550, 300) is rectangle[2]
(250, 300) is rectangle[3]
i am new to C++ so i am having trouble seeing how your equasion can be programmed. i do understand the equasions u've provided though.
Please any suggestions on the programming?
like:
void rotate (float angle)
{
? = (? - px)cos(angle) - (? - py)sin(angle);
? = (? - px)sin(angle) + (? - py)cos(angle);
}
not sure what should be in there.
|
|
|
|
|
OK - for 'Pi', read 'rectangle[i]', for i in the range 0 to 3.
So, for rectangle, assuming you're transforming rectangle into a new rectangle, rectangleNew:
void rotate (float angle)
{
rectangleNew[0].x = (rectangle[0].x - px) * cos(angle) - (rectangle[0].y - py) * sin(angle);
rectangleNew[0].y = (rectangle[0].x - px) * sin(angle) + (rectangle[0].y - py) * cos(angle);
rectangleNew[1].x = (rectangle[1].x - px) * cos(angle) - (rectangle[1].y - py) * sin(angle);
rectangleNew[1].y = (rectangle[1].x - px) * sin(angle) + (rectangle[1].y - py) * cos(angle);
rectangleNew[2].x = (rectangle[2].x - px) * cos(angle) - (rectangle[2].y - py) * sin(angle);
rectangleNew[2].y = (rectangle[2].x - px) * sin(angle) + (rectangle[2].y - py) * cos(angle);
rectangleNew[3].x = (rectangle[3].x - px) * cos(angle) - (rectangle[3].y - py) * sin(angle);
rectangleNew[3].y = (rectangle[3].x - px) * sin(angle) + (rectangle[3].y - py) * cos(angle);
}
Don't try and rotate points in-place...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|