You should seperate the parts in tabs to make it more organised. An example:
[ Home ] - [ C++ Tutorials ] - [ Reviews ] - [ About ] - [ Contact ]
This is just what I would do to make it more...
Type: Posts; User: gin
You should seperate the parts in tabs to make it more organised. An example:
[ Home ] - [ C++ Tutorials ] - [ Reviews ] - [ About ] - [ Contact ]
This is just what I would do to make it more...
Ah I see. That answers the first part. Why are you not allowed to define and intialize a const in a header file with a literal (a literal isn't a const expression?).
I just gave it a re-read there and I saw that the expression is evaluated at compile-time. But what is a const expression? Is this a const expression?:
const int a = 5;
const int b = 4;
...
I know what a const is, I was asking what is a const expression. Because it says you should only define and initialize a const in a header file with a const expression, and nothing else. But does an...
It's not severe speed issues or anything. It's just slow here and there, but once I get into my project it starts to speed up. It's big things like opening up large projects, opening up the settings...
I'm reading about classes and header files in my book right now. It's talking about const definitions in header files saying that you can only define a const with a const expression. What exactly is...
I've just settled with Visual C++ 2008. I'll just need to try and get used to it. I just feel it's quite slow compared to the 2005 edition.
Hi. I've seen people naming their variables as m_*. What does the m_ mean? And why do you use it?
So with these optimisations that VC does... does this mean that it's faster than GCC?
What is a better compiler? MingW or VC? What's the difference between the two?
This looks good (Dev-C++ IDE but updated):
http://wxdsgn.sourceforge.net/
Says it can use both the MingW compiler and the VS one (not the 2008 one though). It's not been updated in a year though...
What IDE would be best? I'm currently using Visual C++ 2008 Express Edition but I feel it's quite big for my current status of knowlage. Half of the stuff I don't use. Is there any light-weight IDE...
I was thinking when I finished these couple of books I should start with an intermediate book perhaps. And while on that think of a project to do. I was thinking about something network related like...
Thing is, there is so many distractions in my house because my house is getting done up, so it's quite hard to concentrate. TV's blaring, people talking, hammers hammering, saws sawing, screwdrivers...
Never thought about that, thanks. Because I was wondering which one I should read first and since C++ Primer has about 900 pages vs Accelerated with about 400, I went with C++ Primer. :p I'm going to...
Thanks matsp, I usually do most of the excercises in a book but there are no answers at the end or anything so I can't check how efficient (or correct) my answers are. At the moment I have two books:...
Is there any good books and/or tutorials to learn programming in general (non-programming language specific if you get me). Currently my goal is to learn C++ and programming in general.
Thanks.
You should give this a read:
http://www.cprogramming.com/tutorial/lesson2.html
To better your understanding of conditional statements and conditional expressions. Once you understand the last...
Well I assume you want to check if they enter 776 or 777, yes? Well you need to use the || (logical OR operator).
EDIT: Also, think about how you've wrote your if statement. This is what it will...
Sorry for my ignorance but when you say an array of character pointers it means it will store the pointers to the dynamically allocated character array which stores the string element?
When I...
Right, I rewrote it and it works great (apart from the memory management):
#include <iostream>
#include <vector>
#include <string>
int main()
{
Why is it when I try to free strElement as:
delete [] strElement;
It crashes on the next part of the loop?
I have:
Wait, isn't that part just meaning to copy the string element into a new character array as I've done:
const char *strElement = vStrings[i].c_str();
I've allocated an array and copied the...
Oh yes, I forgot about that. Thanks, will rewrite it now. ;)
Yeah. But when I output the array how will I know how long the string is?