What is LEN defined as?
Type: Posts; User: Sake
What is LEN defined as?
Yes, a great deal. That was the primary reason that I replaced 6.0 with .NET.
If you are doing C++ then it is definitely worth it. But I got VC++.NET Standard for $99 for my personal copy. What edition was the one you looked at?
>>return (j-1);
This is wrong. You need to return j, not j-1. Most likely the problem your having is that you are passing a size to clean_array that is one too much.
>>A Binary Tree is a map then?
A map is an abstract concept of a collection of items that are accessed by a key. It just happens that a binary search tree is a very close match to that concept...
>>No thanks, I know how to browse usenet with Google, so I can look it up myself if I choose.
But you choose not to because you still think you're right and I'm not? People here are almost as...
Something like this?
#include <stdio.h>
#include <stdlib.h>
long int pctoi(const char *pc)
{
long int ret = 0;
char *end;
stdafx.h is a precompiled header that will be automatically included unless you create an empty project. mscorlib.dll is a header for managed C++ IIRC, but creating an empty project will solve both...
It would help to see what code you have already so that I can help you write something a bit simpler. If you're a beginner than I don't imagine you're using C++ string objects.
>>need help with displaying the numbers contained the file
I'm not sure I understand what you want. Do you want to print the numbers in the file before returning their average?
while (infile >>...
>Any idea why these functions are running after my code is apparently finished?
There's a lot of hidden framework around your program. Consider destructors as a general example. They run behind the...
Since your misunderstanding won't break anything, you can believe what you want to. But if you want to further your understanding of C, feel free to post the following question on comp.std.c.
...
>>Its a product number that I am storing in a structure. It has be an int.
Do you have to put the dashes back at any point? Are product numbers consistent in the placement of dashes? Removing the...
The standard map is usually implemented as a red-black tree. You can find an implementation and description here.
Loop over each character of the string and call toupper on it:
#include <cctype>
#include <string>
using std::string;
using std::toupper;
for (string::size_type i = 0; i < str.length();...
It looks like some memory you allocated got corrupted somehow. Not like that helps you debug it, but memory errors are among the hardest to find and fix.
>>Yet the standard is clear that the ways to declare main are as the following
You'll notice that it also provides for anything equivalent to the two definitions provided, which the section I quoted...
Can you be more specific about how you're going to use it?
>>Quote it then, because it does not mean "no arguments".
You're wrong:
>>As stated, this is not C++, this is the C board.
I'm well aware of that, which is why I made it clear that I was...
You're confusing a declaration with a definition. In C, a declaration with an empty parameter list means that any number and type of arguments are allowed for compatibility with K&R style functions....
While I agree stylistically, syntactically the two are identical.
It guarantees that fullname is a valid null terminated string. If it isn't then strcat will search through memory until it finds '\0', which could potentially exceed the boundaries of the array.
Can you show the code that causes this error?
>>are these correct?
For the most part.
>>what's the difference between scanf() and gets() ?
If you use scanf with the right format modifier then there's no difference. But for the most part,...
>>Yes you need in scanf and printf &
>>If I remove them then I get
You missed the point. It's broken either way if the pointer doesn't point to anything except a random address.