CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: ejohns85

Page 1 of 4 1 2 3 4

Search: Search took 0.02 seconds; generated 34 minute(s) ago.

  1. Replies
    4
    Views
    4,638

    Re: Visual Studio recompiles every time

    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...
  2. Replies
    4
    Views
    4,638

    Visual Studio recompiles every time

    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,...
  3. Storing very small numbers - but only order of magnitude

    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...
  4. Replies
    4
    Views
    16,909

    Passing a sub-range of a vector by reference

    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...
  5. Replies
    2
    Views
    2,305

    stl::sort on a two-dimensional stl::vector

    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...
  6. Replies
    4
    Views
    705

    Re: Streaming Bytes into an Integar

    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...
  7. Replies
    4
    Views
    705

    Streaming Bytes into an Integar

    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...
  8. Replies
    6
    Views
    926

    Re: Printing out Bytes of a File

    Thanks Paul - using the "rb" argument worked!
  9. Replies
    6
    Views
    926

    Printing out Bytes of a File

    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...
  10. Replies
    3
    Views
    604

    Re: fstream problems

    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...
  11. Replies
    3
    Views
    604

    fstream problems

    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....
  12. Replies
    1
    Views
    1,844

    Templates for Header Files in Visual Studio

    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
  13. Replies
    1
    Views
    6,733

    Read GPS EXIF data from image

    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...
  14. Replies
    1
    Views
    1,184

    Adding files to Visual Studio project

    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,...
  15. Replies
    13
    Views
    7,824

    Re: Constructors when resizing std::vector

    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...
  16. Replies
    13
    Views
    7,824

    Re: Constructors when resizing std::vector

    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...
  17. Replies
    13
    Views
    7,824

    Constructors when resizing std::vector

    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...
  18. Replies
    1
    Views
    1,528

    Creating a button with Windows API

    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...
  19. Replies
    13
    Views
    8,919

    Re: Calling non-static functions from WndProc()

    Here is my class:


    class MyWindow
    {
    public:
    // Attributes
    int num_squares;

    // Functions
  20. Replies
    13
    Views
    8,919

    Re: Calling non-static functions from WndProc()

    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...
  21. Replies
    13
    Views
    8,919

    Re: Calling non-static functions from WndProc()

    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...
  22. Replies
    13
    Views
    8,919

    Calling non-static functions from WndProc()

    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...
  23. Replies
    3
    Views
    2,208

    std::vector as a static member

    Hello,

    I have a class with a vector as a static member:


    class MyClass
    {
    static std::vector<int> my_vector;
    }
  24. Replies
    2
    Views
    703

    vector insert() invalidates pointer

    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...
  25. Replies
    4
    Views
    1,840

    Re: fstream with dynamically allocated arrays

    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,...
Results 1 to 25 of 98
Page 1 of 4 1 2 3 4





Click Here to Expand Forum to Full Width

Featured