It's C++/CLI, the modified version of C++ for the .NET platform. Good luck getting good help for it.
Do you need to delete the array of objects? I imagine they get garbage collected.
User Profile
Collapse
-
> what does the statement: {else if ((n==0)||(n--1)){ mean?
Else if (n is 0) or (n is 1):
I doubt your answer was wrong because of not knowing C. Actually, between their answer and your answer, I would favor yours. They have 1 and 0 as a base case for factorial, but it is possible to implement factorial with only 0 as a base case. For that reason, 0 should be tested, and 1 can be omitted....Leave a comment:
-
Because: swap(a,b) doesn't mean use the variables a and b directly in the function swap.
The variables values are copied over to the variables in the function argument. swap(int x, int y) has its own x and y. So you'll swap the two variables in the function, but it won't change anything else. If you use pointers, you'll get a copy of the pointers yes. But you can then change the pointed to values.Leave a comment:
-
And what has compelled you to post that information here? We don't hand out free code, so you know to focus your question.Leave a comment:
-
Post the exact error (by copy pasting). Also, edit your post and put all the code in CODE tags. Anything code like (including console input or output) is best put in code tags....Leave a comment:
-
Short answer, you can't. Essentially you are asking, how can i get up front free work from someone with a vague promise of future payment. Unfortunately, bills don't get paid with promises and hopes.
Yes, in certain circumstances this is a possible approach (I with a friend went on this path for a startup). But what do you bring? No money. No technical knowledge. Experience? Insider knowledge? Connections? Be realistic here....Leave a comment:
-
Explain what you mean because your technical terminology is a bit wonky....Leave a comment:
-
There’s two aspects to that question. One is the issue of code: what exact code do you need to write. The other issue is the algorithm, which is partly independent of the language and code. How do you approach something like this algorithmically ? So you need to sit and think about algorithms. What data structure are you dealing with? How would you do the work on paper? What does pseudocode or plain English instructions for the algorithm look like?...Leave a comment:
-
Yes, presumably it’s why you called it a remove punctuation function, as opposed to retain punctuation function or something. We aren’t sure what your question is though. You requested help, but that’s not necessary. We are all here to help.
But what is your question?...Leave a comment:
-
I don't think Stroustrup's TC++PL book is a great idea for a new person to the language. The structure of the book and the way content is introduced is more suitable for someone who already has a good idea of the language. Certainly, Stroustrup himself thinks it's worth writing another book more suited for a beginner. It's not out yet, but if you look at the table of contents, you can see what I'm getting at.Leave a comment:
-
Depends on the assignment, on how you precisely approach it. But in general, you always break things down into small tasks. Work on a piece at a time, and focus on getting that piece to work.Leave a comment:
-
Your question doesn't really make sense. On one hand you ask about dynamic memory allocation, which is part of C++. Then you talk about RVO, which is a compiler optimization that has nothing to do with the code you write.
You use allocate dynamically when you can't directly on the stack. Examples are too much to allocate for the stack, or you don't know until runtime.Leave a comment:
-
Write coherently. Post relevant code. Describe the problem in entirety. If there is unexpected output, state what you expected instead as well.
The code above clearly doesn't map to the output you have. So until you post relevant code, we cannot help you.Leave a comment:
-
There's a shortlist of books that are reliable and worth reading (or required reading). I consider Accelerated C++ to be one of them, and C++ Primer (by Lippman) to be the other. These two books are the starting points for a beginner.
Note that I don't consider C++ a suitable language for a complete beginner to programming. The two books I mentioned above are invaluable, but they may be a bit too advanced for you if you have never...Leave a comment:
-
We can help. We just won't do other people's work outright. You get why, right?...Leave a comment:
-
Some things that I noticed as soon as I saw the code. If you want start and finish to be non-negative, make them unsigned int, and problem solved. ssLen needs to be finish-start +1 +1. There is a +1 for the null terminator. But there is also a +1 for finish-start. Let’s say finish is 3 and start is 1. Finish-start is 2. What you probably want is an array that is 1,2,3,\0, not 1,2,\0. Right? (Think of fenceposts. You want the posts, not the spaces...Leave a comment:
-
-
Always check the documentation, for something interesting. In this case, look at possible string methods ( http://www.python.org/doc/2.5.2/lib/string-methods.html ) and you will see a split function. Here’s a quick example.
Code:>>> sent = "Jack ate the apple." >>> splitsent = sent.split(' ') >>> splitsent ['Jack', 'ate', 'the', 'apple.']
Leave a comment:
-
As Banfa said, if you don't know what you're doing with getline, read the reference and examples you find from Google searches. If you're expecting us to give you anymore help, you need to formulate a proper question. Telling us you have problems with getline isn't a question. All we can do at the point is tell you to read the references.
A proper question gives us details. You have to tell us precisely the problematic lines of code....Leave a comment:
No activity results to display
Show More
Leave a comment: