@LucDanton I'm not storing integers. I'm trying to use numbers to call a specific string in a string array. So if cin >> input;, and the user types "0," when I call var1[], it will act like I was calling var1[0].
@Xeo I wouldn't do this. Twitter users are notorious for posting lots of irrelevant and private stuff. Just because he's posting lots of C++-related stuff right now doesn't mean he will do this all the time. Also, he's maintaining quite some volume, currently, producing a dozen tweets at a time in short succession. That would be very disruptive.
Well, maybe this would be worth monitoring. But it's still short bursts of very high volume, which IMO is unsuitable for being pasted here automagically.
@Xeo If you want to do this, I suggest you, 1) post the idea in comp.lang.c++.moderated, 2) make it a boost lib, 3) find someone among the committee folks who likes it and would help you to push that through.
the problem is your understanding of what std::map actually does - in the case of char*, the algorithm is comparing character pointers. In the case of std::string, it is comparing the std::string type vs another std::string type
well, on a *nix system, you can pull it into a working directly elsewhere and create a symbolic soft link to it (if you don't want to expose your .git directory)
well, probably the best way is to use git (or any other source control) to store your website locally, say in ~/myGitSite and then have a sym-link point from your website hosting directory to the local copy of your repo'
@JohnShepard yeah, if I do a sym-link (not the proper name btw) to ~/my/sub/dir/ and place it in c:/ and call the sym-link shortcut then c:/shortcut is functionally the same as ~/my/sub/dir/ so what ever I add to the one is added to the other, but with only one copy of the contents
one thing to keep in mind though, if what happens if you do cd c:/shortcut ; cd ..
you can have that either take you back to c: or to ~/my/sub
MyClass *oMyClass; declares an uninitialized pointer. It doesn't point to anything. And oMyClass->lst is asking for "the lst member of whatever object `oMyClass´ points to
afaik most source controls, including the likes of dropbox, see the link like a windows shortcut, so they just back up that, they do not copy the sub folders of what the symlink points
@thameera you very likely don't. And if you do, then you're going to have to step away from the compiler and buy a good C++ textbook before you do anything else
I think I recognize this wellknown, longstanding bug:
http://connect.microsoft.com/VisualStudio/feedback/details/105511/find-in-files-says-no-files-were-found-to-look-in-find-was-stopped
The workaround mentioned there worked for me when I had this problem
I found a tip to try pressing Ct...
I know this from VS2003, VS2005, VS2008 and apparently now still in VS2010
> Microsoft Visual Studio 2010, Version 10.0.30319.1 RTMRel. This error is still happening in November 2011 when it was reported 7/20/2004. Remind me again how much Visual Studio costs? LAME.
so pointers are supposed to be a powerful mechanism, but from my understanding, they should be used as little as possible. Is that because they are error prone? What is the gripe with pointers?
rocket scientists generally rely on newtonian physics, not Einstein's relativity theory, because it's good enough for them, and it's a hell of a lot simpler.
And C++ programmers generally rely as little as possible on pointers, because for most purposes, you don't need what they can do, and they complicate matters
and with a pointer, you have to consider that it might point to any of a billion different addresses (assuming it points to a 4-byte object on a 32-bit system)
and smart pointers, of course. It doesn't matter what's "under the cover". Under the covers, function calls are basically just gotos. That doesn't mean we should use gotos all over the place
what matters is the abstraction presented to the programmer
anyway, a reference can point to memory on the free store too. It just can't be reseated
@Abyx so... install n MG client, and then I can use this command to pull in all the vobs I need. Will I be able to perform all the normal snafoo, branching, 'config specs' etc. that CC uses?
currently, I have my main view, and I have about 10 vobs in it, and I have to swap config specs when I switch between working on new stuff and when doing bug fixing on older releases
@Abyx each component gets it own vob, there are fuck loads
now to find out how to set up views again :P
fuck me it's a lot of arseing around to set up a view
@Abyx with clear case... each view mounts to it's own drive, with many vobs in this drive. How can I then set up Hg so that each Vobs is in a Hg Repo, but a branch for each configspec/view
I often use the Boost strong typedef utility to improve the safety of my programs. For example by writing code like this:
BOOST_STRONG_TYPEDEF(int, X)
BOOST_STRONG_TYPEDEF(int, Y)
BOOST_STRONG_TYPEDEF(int, Width)
BOOST_STRONG_TYPEDEF(int, Height)
struct Rect {
Rect(X x, Y y, Width w, Height...
I was reading some starting items of Effecting STL (re-reading in some way)(Had read effective C++ long time ago) and I realize Mr.Scott uses too much theory which is really hard to endure for me now, so can anyone point some very important items of that book only ?
If the problem is simply "too many words", then you'll just have to work on your reading skills. If the problem is "I don't understand what he's talking about", then the answer might be to read it again, slowly, looking up the parts you understand, or it might be to read some other books first, or to get more experience with programming or something else
Like making useful stuff in C++, I just learned C++ because I felt I needed to know it, I picked it up and could write decent console programs (some basic windows stuff) but I have no proper hardcore practise
I mean like if I have to make a windows program I would have to learn MFC, are there any alternative ways to use C++ to practice and make useful stuff.