Ok, so here's what's to do, @RMartinho: Cook the rice while you do the rest by putting it into well-salted boiling water. (See the package for details.) Since the rice you have takes only a few minutes (how many was it?), the longest will probably be to get the water boiling. You can have water almost boiling by the time we start here. For one cup of rice (probably enough for you), I take 2.5 cups of water, even though the package says 2 cups of water. Cook the carrots, by putting them into just enough cold, slightly salted water, and putting that to a boil. The time it takes to get them do…
check my blog post then. create the repository in the root folder for the project, run bzr ignore <pattern> to tell it which files/dirs to ignore, bzr status to see what has been added and what hasn't, and bzr add to add anything that's not on the ignore list
@RMartinhoFernandes same as in hg or git
well, same as in hg. In git you have to edit .gitignore, iirc. With bzr you can do that, or just type bzr ignore <stuff>
If I have a vector of objects in one class which I want to change in another, I would try and pass all the information by reference.
What exactly do I need to pass by reference though? the vector? the objects? both?
essentially what I'm asking is; what is the difference between these?
vector&a...
well, when you build, it creates a Debug (or release) folder somewhere, right?
creating an ignore rule for Debug/ just tells it to ignore any directory (not only ones in the root, but in subfolders too) with the name Debug (the trailing slash is to indicate that it's a dir. Debug would refer to both files and dirs)
Anyway, I'm guessing you don't want to ignore /Game1
so most likely, ignore the things I said (or the ones from @RMartinhoFernandes's link above), and run bzr status, and it'll probably only show files and dirs that you do want to track
You can check that list to make sure you got all the garbage covered.
My flatmates once complained that hg was too slow (I had suggested it to them for a school project). Turned out they had a 50MB IntelliSense database in the repo.
anyway, wherever you ran`bzr init` is your bzr repository, loosely speaking.
@CatPlusPlus in bzr, the branch, not repository, is the basic unit being source controlled. You can then optionally create a shared repository which multiple branches use to store their metadata in, but if not, each branch is self-contained, like the one @LewsTherin just created
Does anyone know how convert C++ code to assembly code and then do the reverse?
The forward way is very easy:
g++ -S
I want to analyze the output and see if it has been compiled correctly (Just for curiosity now, but it can have some applications). However, my knowledge of assembly is very lim...
@RMartinho: I don't know what you want now. Are you going to work down my to-do list and just throw a question at me when you're unsure, or should we perform each step together?
For the purposes of brevity, this is the simplified hierarchy:
class IBase
{
public:
virtual ~IBase() = 0 { };
}; // eo IBase
class IDerived : public virtual IBase
{
public:
virtual ~IDerived() = 0 { };
}; // eo IDerived
class Base : public virtual IBase
{
public:
Base() { };
...
Short answer: Virtual functions are about not knowing who called whom until at run-time, when a function is picked from an already compiled set of candidate functions. Function templates, OTOH, are about creating an arbitrary number of different functions (using types which might not even have be...
@RMartinhoFernandes Well, rice is a no-brainer, but you gotta start with something. :)
I am looking for a game development library using C. The C library should have graphics rendering capacity (in 2D) like drawing different shapes etc. Can we have the functions like moving these shapes, checking for its collisions etc. with it? OR do we need to have physics engine for that sake?
...
I have heard that member function templates can't be virtual. Is this true?
If they can be virtual, what is an example of a scenario in which one would use such a function?
I'm porting to C++ and adding a lot of functionality to a numerical application written in Fortran 77. While I hate F77, I have to admit that the thing goes very fast. Now, I'm implementing practically the same structure and algorithm, but nevertheless the difference in the execution time is noti...
I'm currently reading Juggler of Worlds by Niven & Lerner. I have read, a while ago, all the Ringworld books and a few other Known Space, so I remember that
the Puppeteers used a Starseed lure to get Outsiders to the humans so they could obtain the hyperdrive technology and defeat the K...
Your code will hardly become faster magically by sprinkling a few keywords here and there. And simply copying algorithms from one language to another (if that's indeed what you are doing) is never going to help. Speed correlates with
a good design, and
selectively applied optimizations as a r...
int a = 0; //it is a declaration (and definition too) statement
a = 42; //it is an assignment statement
The second line is the cause of error, for it is an assignment statement.
At the namespace-level, only declaration and definition statements are allowed. Assignment-statements are not al...
@sbi how many Known Space stories have you read before? By the time I read Juggler I had read almost everything, and I found the first two thirds of the book incredibly boring. It's basically a retelling of Beowulf's stories, as seen from Sigmund's and the puppeteers' POV.
ok, can anyone look at this question then and tell me that ildjarn is not an ass or that his changing the question into something completely different was ok?
@RMartinhoFernandes true, you can't. Which is why I object to him just rewriting the question into "oh, he probably wants to rewrite his program as C++/CLI then"
I'm happy to say, however, that there will be a fifth book. And unlike Fleet, Juggler, Destroyer, and Betrayer, Fate of Worlds will be a sequel, rather than a prequel, to the Ringworld books. - Edward M. Lerner
@bamboon thanks for that link. it is quite refreshing to read honest technical stuff from microsoft. even where it's not good news. i think our former chairman must have influenced the culture there. perhaps.
@awoodland - I could have although I actually prefer malloc to new. It can't throw and it doesn't have the unpleasent gotcha where you allocate an array and forget to delete[]. – Benj 48 mins ago
@RMartinhoFernandes Oh, I think Fleet of World is one of those I have read. Is that the one with the humans "saved" by puppeteers, and kept for "helping" their saviors?
malloc is a function from the C standard library that allocates memory. Period. That's it. Nothing else. There's very little you can do with raw uninitialised memory like this. The things you can do with it basically boil down to initialising it by hand (see new below), or releasing it. You can't...
I am new to C++ programming but have a solid background in C#, Java and PHP. I see in C++ there are multiple ways to allocate and free data and I understand that when you call malloc you should call free and when you use the new operator you should pair with delete and it is a mistake to mix the...