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

Search:

Type: Posts; User: LMHmedchem

Page 1 of 15 1 2 3 4

Search: Search took 0.46 seconds.

  1. Re: bizare compiler error assigning a value to a string (expected constructor, etc)

    Oddly enough, it is working now. I am not sure what I did but now the map is being read correctly using your suggested modifications.

    LMHmedchem
  2. Re: bizare compiler error assigning a value to a string (expected constructor, etc)

    I made your suggested modifications and it compiles. your changes are in red text.


    // file comments.h

    #ifndef WRITE_FILE_COMMENTS_CPP_H
    #define WRITE_FILE_COMMENTS_CPP_H

    #include <string>...
  3. Re: bizare compiler error assigning a value to a string (expected constructor, etc)

    Thanks, yes that was the problem. I made a loading function that declares the map, assigns the key/value pairs, and returns the map to the calling function. I have done this before, so I don't know...
  4. bizare compiler error assigning a value to a string (expected constructor, etc)

    Hello,

    I am writing a little program and have run into a strange error doing something I must have done thousands of times. I am writing a static map<unsigned int, string> in a header file and...
  5. Replies
    5
    Views
    819

    Re: size of allocated shared memory

    So at the moment, I am allocating 61440 bytes and not 61440 bits like I thought?

    Based on the data that is being passed,


    C number of elements in each array
    PARAMETER( SIZEX = 476 )
    C number...
  6. Replies
    5
    Views
    819

    Re: size of allocated shared memory

    I am not sure since I didn't write this section.

    I think the code I posted earlier was not helpful, meaning it looks like that was just the statement that initialized the shared memory block to 0....
  7. Replies
    5
    Views
    819

    size of allocated shared memory

    Hello,

    I have two c++ binaries that perform some IPC using shared memory. I didn't write this code and the comments are a little unclear. I need to develop a unambiguous formula for determining...
  8. Replies
    8
    Views
    682

    Re: map name does not name a type error

    The code I posted compiles, I haven't checked it at runtime yet. For now, the map will only contain the 10 entries I listed above. It may actually be less overhead to just use an if else conditional...
  9. Replies
    8
    Views
    682

    Re: map name does not name a type error

    I already have a constants.h file, so I added the lookup function there,


    // constants.h

    // include guard
    #ifndef CONSTANTS_DEF
    #define CONSTANTS_DEF

    #include <string>
  10. Replies
    8
    Views
    682

    map name does not name a type error

    Hello,

    I wrote the beginnings of a very simple map to use as a lookup.



    #include <string>
    #include <map>

    using namespace std;
  11. Re: detecting duplicates in a vector

    The problem in my post was a typo. The real problem was that I checked the data container before the names were it in. I printed name_list.size() and it was correct, but all the name values were the...
  12. detecting duplicates in a vector

    Hello,

    Sorry for having multiple threads going but this is bugging me. I have a little function to check some input data for duplicates and it's not working.


    // class for main data container...
  13. Re: vector of pointers to a vector of objects, pointer or iterator?

    The function definition for vector_between_points() is in the first code block in post 13, but I wasn't passing the vector of double to vector_between_points() as a constant reference. Changing that...
  14. Re: vector of pointers to a vector of objects, pointer or iterator?

    Changing to a vector of iterators has created a quandary with some of my functions. When I was looping on my vector of data objects, I would pass object member variables to functions directly by...
  15. Re: vector of pointers to a vector of objects, pointer or iterator?

    I thought it would be something stupid, I can't pass my data container to the function as const and then assign the location .begin() to a normal iterator. Unless there is some other method or...
  16. Re: vector of pointers to a vector of objects, pointer or iterator?

    I am doing some of the basic work to collect a subset and loop on it.

    I am getting a compiler error from the function that is collecting the subset,



    // row_data class defined
    class...
  17. Re: vector of pointers to a vector of objects, pointer or iterator?

    Generally I would have already confirmed that an object was created corresponding to each name, but I guess there are other reasons why find_if() could fail. I need to add allot more exception...
  18. Re: vector of pointers to a vector of objects, pointer or iterator?

    Sorry for the delay, I spent most of yesterday with the computer off because of allot of local lightning.


    In this case, there are about 2000 rows of data. For each row, there is a vector<string>...
  19. vector of pointers to a vector of objects, pointer or iterator?

    Hello,

    I have allot of data stored in a vector of the following objects,


    class row_data {

    public:

    // class constructor
  20. Re: should the class constructor be defined before or after public member declaration

    The main reason I still use c++98 (and sometimes still gcc3) is that I often have to work on a very large program that was originally written in F66 (on IBM punch cards) and then revised when F77...
  21. should the class constructor be defined before or after public member declarations?

    Simple question this time. I was reordering some classes to get rid of annoying "will be initialized after" warnings and it suddenly didn't make any sense to me that I was declaring my public member...
  22. Re: methods for declaring and populating an object in a loop

    I typically use c++98, but I do probably have other versions installed. I would probably have to change my makefile.

    The result class has about 12 bools and about the same number of ints, so there...
  23. methods for declaring and populating an object in a loop

    Hello,

    I have a result object and a function that populates it. I am using an object for the results because the returned information is complex. The processing function is called many times in a...
  24. looking for source of major page faults

    Hello,

    I am working on a tool that is running alright but /usr/bin/time -v indicates 1393 major page faults. This doesn't make any sense because the footprint of the application is only 356608 kb...
  25. Replies
    4
    Views
    523

    Re: dynamic allocation of 2D array

    I have been trying to reply to this for a while but there appears to be something wrong with the site. Every time I click on preview, or go advanced, I get an error page. I will try again tomorrow to...
Results 1 to 25 of 362
Page 1 of 15 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)