|
At the very beginning I would recommend you to go with notepad + gcc. This would be very useful in order to understand the compilation model (how c/cpp/h files work) and linking. This is very useful/necessary knowledge that you need even when you are using an IDE with a larger project to help you in development. If you later switch to an IDE then on windows Visual Studio is by far the best. If you are using a better version than the free Visual Studio Express edition then you can use plugins/addons like VisualAssistX and Productivity PowerTools to make it even better. On MacOSX you can use Xcode. On linux code::blocks, this is a free ide that is crossplatform, available on all other platforms.
|
|
|
|
|
Code::Blocks is an excellent tool. Certainly, VS does have a larger feature-set than C::B, though one which provides little utility to many of us. There is precisely 2 features that I value it for.
The API reference (which doesn't come in Express versions) and the debugger, which I concede is second to none that I've used. I commonly create a VS project file simply so I can debug the program I'm working on. Too bad I can't debug Arduino code with VS also.
Other than that, it's slow, is visually unpleasant to me, is a large download, is a massive install (for an ide/compiler) and requires registration. It's also not available unless your platform is MS Windows.
My first compiler/ide/help file system went home on about 5 or 6 1.44MB floppy disks. (Turbo C++ 3.1)
Last time I grabbed VS, it was a 700MB download. Code::Blocks is currently 97MB.
VS Express for desktop apps requires 5GB of diskspace, C::B is under 500MB
Neither VS Express or Code::Blocks comes with a resource-editor. I use ResEdit for C::B, pr I use wxFormBuilder if working with wxWidgets. wxSmith is a bit crappy, imho - though it is integrated with the ide. wxSmith is the only wxWidgets resource editor I've seen that runs on the Raspberry Pi with Raspian as the OS.
Using this poor 4gb i3 win7 laptop of mine, I timed how long it takes to start the program, create a new console c++ project, paste the following snippet, build and run it.
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
Code::Blocks 12.11 comes in at 52 seconds
Visual Studio 2010 Ultimate comes in at 2 mins 10 seconds
Though much of this time is in starting the program and parsing all of the include files.
Taking a larger project and allowing it to load first before hitting build - my pdf generator in this instance.
C::B build time: 14s
VS build time: 16s
VS debugger: 1st-class, 10 star rating
Code::Blocks debugger: de-what?
Each has its advantages, one should choose the application that best suits one's needs.
"Science adjusts its views based on what's observed. Faith is the denial of observation, so that belief can be preserved." - Tim Minchin
|
|
|
|
|
visual c++ 6 is very easy
|
|
|
|
|
Hi,
I have an horizontal custom QSlider without handler, and rounded corners.
My problem is when I set slider value to the minimum or the maximum (+-1px), and external corner is NOT rounded anymore...
It seems to happen when the slider value gets round radius, I hope I am explaining myself...
The stylesheet code is:
QSlider::groove:horizontal {
border: 1px solid #999999;
height: 8px;
margin: 2px 0;
border-radius: 5px;
}
QSlider::handle:horizontal {
width: 0px;
border: 0px ;
margin-right: 0px;
border-radius: 0px;
}
QSlider::add-page:qlineargradient {
background: white;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}
QSlider::sub-page:qlineargradient {
background: red;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
Thanks in advance,
Diego
|
|
|
|
|
What does this have to do with C,C++ or MFC?
Veni, vidi, abiit domum
|
|
|
|
|
you should probably ask this on a QT-specific site.
|
|
|
|
|
Hi ,all,
when PC starts up , smss.exe will create new session
-service session (wininit.exe...)
-User session (winlogon.exe ...)
Now i want to create a new session inside MyService.exe .
Can you share with me document or ebook ?
wininit.exe
---------services.exe
-------------svchost.exe
-------------MyService.exe
explorer.exe
------- chrome.exe
wininit.exe
---------services.exe
-------------svchost.exe
-------------MyService.exe
----------------wininit.exe
-------------------services.exe
------------------- -svchost.exe
explorer.exe
------- chrome.exe
Thanks
Thong LT
|
|
|
|
|
This is really a Google question, it has nothing to do with C++.
Veni, vidi, abiit domum
|
|
|
|
|
|
Hello,
I have a need to create a C++ non-dotnet DLL that will be called and used by a VB.net application. I am trying to determine the type of DLL to create. The DLL will contain some classes, variables, and functions that I will be writing. I understand that there are three types of a DLL that can be created: 1) Regular DLL - Statically Linked to MFC, 2) Regular DLL - Dynamically Linked to MFC, and 3) DLL that uses the Standard Windows Libraries, non-MFC.
My question is, which would be the best to use, one that is linked to the MFC, or one that uses the standard windows libraries? Can someone make a suggestion and explain the differences between MFC and the standard libraries?
Thanks!
Gary
|
|
|
|
|
Given that you are calling it from VB.NET, unless you want to go through p/invokes, might I suggest looking into C++/CLI? This gives you what you want and accesses both managed and unmanaged stuff.
|
|
|
|
|
David,
Thanks. I'm not sure that will meet my needs. The DLL needs to be a truly compiled DLL and not part of the .net libraries. Are my assumption correct that if I use C++/CLI, it makes it a C++.net DLL?
Again, thanks.
Gary
|
|
|
|
|
In a C++/CLI DLL you can decide on class level whether you want to make it an unmanaged class (wich I think you mean with truly compiled) or a managed (.Net) class. You could create the business logic in unmanaged classes and provide a managed interface/wrapper for the VB.Net classes to call directly.
The good thing about pessimism is, that you are always either right or pleasently surprised.
|
|
|
|
|
I would suggest option 3, a standard C-style DLL. Your VB.NET code can then access the functions through the P/Invoke mechanism[^].
Veni, vidi, abiit domum
|
|
|
|
|
#include<stdio.h>
#include<iostream.h>
void main()
{
cout<<"cout is executed"<
|
|
|
|
|
This is most probably a result of buffering of the output streams. I would bet that depending on the scenario/platform/compiler you could get different results with this very same code. Don't write such code or flush the streams if you want to guarantee write order.
|
|
|
|
|
Why are you trying to use both functions at once ? Is there any advantage ?
"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.)"
|
|
|
|
|
If you're using a standard C++ compiler then the cout should happen first. However as you're not using a standard compiler (cout and printf are members of the std namespace for a standard compiler) then all bets are off. Get a new compiler and see if you have the same problem.
|
|
|
|
|
What if you called "flush" at the end of each? Does it make a difference?
"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
|
|
|
|
|
Hi,
I have problems with 'WindowStateChange' events in my QWidget.
I have created a simple test widget with 3 buttons, to set window state:
Normal: showNormal();
MAX: showMaximized();
FullScreen: showFullScreen();
and trace window state events (QEvent::WindowStateChange).
When I change 'normal' <-> 'max' there is no problem (altough i receive twice 'max' event), BUT when i change 'max' <-> 'fullscreen' i receive this events:
'max' --> 'fullscreen'
----------------------------
0 No State
4 FullScreen
'fullscreen' --> 'max'
---------------------------
6 Maximized
4 FullScreen
6 Maximized
2 Maximized
with code like this:
state = windowState();
if ( state & Qt::WindowMaximized )
qDebug() << state << "Maximized";
So my widget has in both cases a strange flickering. That is, when 'max' --> 'fullscreen', it has an 'intermediate' "normal" state (0), and when 'fullscreen' --> 'max', it has several 'intermediate' states...
In my application, I must show/hide things when app is normal/maximized/fullScreened, so this flickering is really a problem.
Is it possible to do anything?
Thanks in advance,
Diego
|
|
|
|
|
When changing states in this way it is often best to suppress window updating during the transition, to avoid such flickering.
Veni, vidi, abiit domum
|
|
|
|
|
hello.,
I am new to visual studio.And I am trying to develop "how to send a mail from mfc dialog based application by using c++ language".So any body can tell me how to develope this project
|
|
|
|
|
|
|
See here.
"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
|
|
|
|