Search:
Type: Posts; User: ejohns85
Search:
Search took 0.03 seconds.
-
February 25th, 2013, 02:49 PM
Hello,
Thanks for your help. I'm not sure what you mean by one of my source files having "a date that's in the future"? I am not making any changes to any of the code. I just click on the green...
-
February 18th, 2013, 08:30 AM
Hello,
I am running Visual Studio 10 project, and I have some code that compiles fine. I have just recently included a third-party library with a header file. Now, every time I run my project,...
-
February 9th, 2013, 11:50 PM
Hello,
I want to store a very small number - too small for even a long double. However, I don't need the number to be stored very precisely - in fact, all I really need is the order of magnitude...
-
December 18th, 2012, 04:49 PM
Hello,
Suppose I have a stl vector of ints, and I want to pass a sub-range of that vector as an argument to a function. One way of doing that would be to copy the sub-range, and then pass that...
-
October 30th, 2012, 08:18 AM
Hello,
Suppose I have a two-dimensional stl vector (a vector of vectors), for example:
vector<vector<int> > x;
And then I want to sort the outer vectors in order of the size of their...
-
September 5th, 2012, 06:51 AM
Yes, getc() is converted to an int automatically, but I want to be able to stream three bytes, and concatenate them into a single integar. In this way, the first byte in the integar is zeros, and the...
-
September 4th, 2012, 09:17 PM
Hello,
I have a FILE stream, and I want to create a function that streams a specified number of bytes (up to four bytes) and returns the value of this, as an integar.
For example, supposing...
-
September 4th, 2012, 09:06 PM
Thanks Paul - using the "rb" argument worked!
-
September 4th, 2012, 02:14 PM
Hello,
I am encoding some information in a binary file, and I want to check what I am doing by printing out all the bytes that represent the file.
This is being done by opening a pointer to the...
-
August 24th, 2012, 07:25 AM
Hi,
Thanks for your help. However, I have tried using ios::ate instead of ios::app, and the output I got was "4, 7, 6, 6, 6, 6". So it seems that when I seekp, it is seeking relative to the out2...
-
August 23rd, 2012, 11:04 AM
Hello,
I am trying to stream data to a file, and then return to the file to add further data. When I add data the second time, I then want to update the value of the second byte in the whole file....
-
July 26th, 2012, 12:59 PM
Hello,
Typically, I create one header file per class. As such, the basic structure of most of my header files is as follows:
#ifndef MYCLASS_H
#define MYCLASS_H
class MyClass
-
April 25th, 2012, 04:17 PM
Hello,
I'm trying to write some C++ code in Windows to read the GPS EXIF data from a JPEG image. The only C++ example I have found (http://www.codeproject.com/Articles/3803/Cexif) reads many of...
-
July 27th, 2011, 08:39 PM
Hello,
In my Visual Studio project directory, I have created two folders, "Source" and "Include", which contain the source and header files. How can I add a source or header file to my project,...
-
July 12th, 2011, 04:18 PM
Hi,
The reason I'm using a mixture of vectors and dynamically-allocated arrays is because my dynamically-allocated arrays are very large, and require a very fast access time. The vectors are short...
-
July 12th, 2011, 03:18 PM
Hi,
Thanks for the help. My program does not actually rely on the number of times the constructor is called, I just wrote that code to illustrate the idea.
The issue I was having that brought...
-
July 12th, 2011, 02:31 PM
Hello,
I've come across a discrepancy between running the following code under Linux and Windows. I have a vector of MyClass objects, which I resize to a length of 5. The number of MyClass objects...
-
Hello,
I am trying to create a button using the Windows API (not using Windows Forms), using OpenGL in 2D mode to draw the button. So far, what I have done is to monitor every time the mouse is...
-
Here is my class:
class MyWindow
{
public:
// Attributes
int num_squares;
// Functions
-
Thanks for your help. This would mean that I would have to create my class from scratch again, which means resetting all variables to their original values in the constructor. All the variable values...
-
I'm sorry, I don't understand your solution....
Basically I'm confused because WndProc() is static, and so this means that it cannot access any non-static variables or non-static functions in a...
-
Hello,
I am just starting out trying to write a Windows application using the Windows API, but I am having problems understanding the WndProc() function. I know that WndProc() is called whenever...
-
Hello,
I have a class with a vector as a static member:
class MyClass
{
static std::vector<int> my_vector;
}
-
Hello,
I have a vector, vector1, of MyClass objects. I then have another vector, vector2, of pointers to these objects. I then want to add a third vector, vector3, to the end of vector1. I do this...
-
Ok thanks, I understand that now. However, I'm now confused why my attempt with the static array worked. If I used "float x[3]" instead of "float* x = new float[3]", with "out.write((char*)x,...
|
Click Here to Expand Forum to Full Width
|