Type: Posts; User: fiodis
Search took 0.01 seconds.
The complete program's several thousand lines split up among different source files. I'm never sure what to do when I need help with those; I know I should post as complete a program as possible,...
At one point in my C++, non-CLR program, the following code:
unsigned int size = 3;
float maxX = (float)(int(size-1))/2.0f;
std::cout << maxX;
outputs 107. I have no idea why; is it something...
March 27th, 2013, 10:24 AM
I managed to get the functionality I needed by allocating the array on the heap, thanks guys. :)
But I didn't know about static memory. Why is it called "static"? I can still change the value...
March 26th, 2013, 03:49 PM
Hmm. It seems I'm thinking of pointers in the right way, but I'm having trouble creating an array in the first place. This:
int main(int argc, char *argv)
const unsigned int res = 512;...
March 26th, 2013, 10:13 AM
Ah, sorry about that - this is C++, non-CLR code.
March 26th, 2013, 09:46 AM
I have an array of char representing pixels in a bitmap, which I want to modify. I don't think I can just iterate over the array and pass chars into a function individually, because the function...
January 3rd, 2013, 06:26 PM
I see. Thanks everyone! :)
January 3rd, 2013, 05:45 PM
Huh. That single line replacing the entire loop worked perfectly. Thanks! :)
But what do you mean I was creating an empty file? You're right, filePathString is the path to a file that already...
January 3rd, 2013, 03:36 PM
I have a std::vector of short ints that I need to write to a specific location in a binary file (without using .NET code). To that end, I wrote up this code:
November 18th, 2012, 05:48 PM
With that suggested code, I get an error:
'std::basic_istream<_Elem,_Traits>::read' : cannot convert parameter 1 from 'short *' to 'char *'
November 18th, 2012, 03:45 PM
I'm having trouble reading a block of bytes into a vector of short ints. My code is as follows:
int iter = 0;
September 21st, 2012, 08:56 PM
That could be my problem. What's the purpose of the tag, then? MSDN says it could be used to refer to the structure type in code later, but why can't you just use the name of the type?
September 21st, 2012, 08:09 PM
Using VS2010, I defined a custom struct in the file vectorMath.h:
typedef struct Vector
Then in main.c I have:
And, later on,
August 22nd, 2012, 10:35 PM
Thanks! It's building, though with a few errors I'll have to sort out. Can I use Visual Studio to export it as a dll file? Searches only seem to describe how to do it with Visual Studio C++, not...
August 22nd, 2012, 03:17 PM
I've modified the source code for a .dll, but I'm not sure how to recompile it. I just opened one of the source code .cs files with Notepad and made a few changes. I think if I can load it in...
June 28th, 2012, 01:15 PM
Ah, I see. Again, thanks for the help, and thanks for the tip about Environment.Newline. :)
June 28th, 2012, 08:55 AM
Thanks! I was messing around with try/catch, but that code loads it perfectly (though newline in C# is \r\n instead of \n :) )
I'm not quite sure how lists work, though I think I have a basic...
June 27th, 2012, 09:50 PM
Wow, I didn't know about IndexOf; that'll be useful. :)
Unfortunately I get an error inside the while loop, again with the length parameter of Substring, this time saying that "Length cannot be...
June 27th, 2012, 03:45 PM
If by anything you mean code for reading it, I was trying to think of how to go about it when a friend suggested I use ReadLine to put each line into a string array, then for every property I could...
June 27th, 2012, 01:17 PM
I'm trying to read a txt file that has properties laid out in the format:
Ambient(255.000000, 255.000000, 255.000000); //rgb...
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.