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.29 seconds.

  1. Re: makefile commands to create directories, CentOS7 , GNU Make 3.82

    I fixed this by changing the order of the assignments,


    # create name for the build directory
    BDIR := bld_$(OS)_$(KERN).$(ARCH)_$(CNAME)_$(FNAME)_$(ver)
    # mkdir if the directories do not exist...
  2. makefile commands to create directories, CentOS7 , GNU Make 3.82

    Hello,

    My makefiles are set up to generate an environment specific build directory based on the local configuration and some values passed to make. It generally looks like,

    # compilers, may be...
  3. Replies
    2
    Views
    2,979

    Re: -Wno-unused-varialbe flag has no effect

    I always use := when adding to a variable that has already been assigned.

    I would do,

    # set for most warnings
    CFLAGS = -Wall
    # add to CFLAGS to supress some warnings in all
    CFLAGS :=...
  4. Replies
    2
    Views
    2,979

    -Wno-unused-varialbe flag has no effect

    Hello,

    I have an application that I just brought into eclipse. I have previously just built this application from the command line. I am looking to suppress some warnings in the short term but...
  5. 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
  6. 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>...
  7. 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...
  8. 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...
  9. Replies
    5
    Views
    3,676

    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...
  10. Replies
    5
    Views
    3,676

    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....
  11. Replies
    5
    Views
    3,676

    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...
  12. Replies
    8
    Views
    10,694

    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...
  13. Replies
    8
    Views
    10,694

    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>
  14. Replies
    8
    Views
    10,694

    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;
  15. Replies
    4
    Views
    4,434

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

    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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...
  21. 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...
  22. 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>...
  23. 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
  24. 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...
  25. 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...
Results 1 to 25 of 366
Page 1 of 15 1 2 3 4





Click Here to Expand Forum to Full Width

Featured