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

Search:

Type: Posts; User: LMHmedchem

Page 1 of 11 1 2 3 4

Search: Search took 0.01 seconds.

  1. how do I store and retrieve this data in my class?

    Hello

    I have a class I use to store column data read from delimited text files.


    class column_data {

    // class functions here

    public:
  2. Replies
    3
    Views
    341

    Re: c++ statistics code

    Thanks for the suggestions. I ended up writing my own code based on available examples. There are a number of available libraries that support these calculations, but the functions weren't very hard...
  3. Replies
    3
    Views
    341

    c++ statistics code

    I am wondering if there is some repository of c++ code for statistics comparing two columns of numbers? Statistics are so common now that it seems like with the oo concept of reusable code there...
  4. Re: sequentiall reading blocks of lines from a file

    Well this is what I have at the moment,



    // declarations
    unsigned int i, number_of_lines, lines_per_data_block;
    string new_line;

    // 390 for this input file
    lines_per_data_block=390;
  5. sequentiall reading blocks of lines from a file

    Hello,

    I have a file that I need to read in blocks. I need to read in n lines at a time, do some processing, and then read in the next block of n lines until the file is done. I know the size of...
  6. Replies
    16
    Views
    1,153

    Re: question about sorting on bitstrings

    I have made a few modifications to make the tool more widget like. It now reads the subset size from the command line and takes the data from an input file.



    // file sort3_02.cpp based from...
  7. Replies
    16
    Views
    1,153

    Re: question about sorting on bitstrings

    Well I was able to run this set of data and I pulled out all of the strings that were found to have common 3 bit subsets. Then I dropped the subset size to 2 and run the strings that had no common 3...
  8. Replies
    16
    Views
    1,153

    Re: question about sorting on bitstrings

    I was still having some problems because of the range-based for loops but I did a little looking around and was able to compile with,

    g++ -c -std=c++11 sort2_03.cpp

    It looks like the default...
  9. Replies
    16
    Views
    1,153

    Re: question about sorting on bitstrings

    Thanks to everyone for all the thoughtful replies so far. I am compiling the code posted by razzle and having some issues. I don't have VS, so I am compiling with gnu. I don't think that the first...
  10. Replies
    16
    Views
    1,153

    Re: question about sorting on bitstrings

    Thanks,

    I compiled the code you posted and ran it with some additional data. This is the code I compiled,


    #include <iostream>
    #include <string>
    #include <cmath>
    #include <vector>
    using...
  11. Replies
    16
    Views
    1,153

    Re: question about sorting on bitstrings

    Yes, I am having trouble with the definition, partly because this is something I am still try to figure out. I'm not exactly sure what the best outcome really is, so I have to start with a best...
  12. Replies
    16
    Views
    1,153

    question about sorting on bitstrings

    Hello,

    I have a problem I am working on where I need to sort some data based on the values of a string of bits. The strings look like this,

    010000001110000000

    there are 18 bits, 1 means a...
  13. Replies
    10
    Views
    723

    Re: segfault at declaration of 2D array

    I am looking at something like this,



    #include <vector>
    #include <iterator>

    // resize 2D storage structure
    void resizeVec( std::vector<std::vector<double> > &vec , int ROWS , int...
  14. Replies
    10
    Views
    723

    Re: segfault at declaration of 2D array

    Well, as I said, I didn't write this code and had never really looked at it before it failed today. I can hard code the array size using static and process the files I am looking at, but I would have...
  15. Replies
    10
    Views
    723

    Re: segfault at declaration of 2D array

    This program has worked for a long time as written. I will process a smaller input file with no issues. It was also my understanding that the compiler needed to know the size of an array to know how...
  16. Replies
    10
    Views
    723

    Re: segfault at declaration of 2D array

    gcc version 4.8.2 (GCC)

    I am compiling with g++, but it looks as if this is written in c. Would it make any difference to compile with gcc?

    If I convert to static and hard code for this input...
  17. Replies
    10
    Views
    723

    segfault at declaration of 2D array

    Hello,

    I have a little program that does some statistical processing on text files. The program has thrown a segmentation fault with an input file that is larger that I have used before. I didn't...
  18. Re: directory name must immediately follow -I compile error

    I guess I need to add some additional error checking like that. These global variables, like the number of graph neighbors, are used for thousands of calculations and it would be a bore to check...
  19. Re: directory name must immediately follow -I compile error

    For the second case,
    XV0 = XV0 + 1/sqrt(fabs( (double)molAtoms[currentAtom].valenceDelta ));

    The class member molAtoms[currentAtom].valenceDelta is a float, but XVO is a double. I am running...
  20. Re: directory name must immediately follow -I compile error

    Since X0 and XV0 are doubles, I changed to,

    // simple X0, sum reciprocal square root of simple delta
    X0 = X0 + 1/sqrt( (double)molAtoms[currentAtom].simpleDelta );

    The compiler...
  21. Re: directory name must immediately follow -I compile error

    Well removing the space does get it to compile, except there are some errors. Oddly, these compiler errors do not show up under gcc3.4 cygwin, only under gcc3.3 opensuse. That is another issue I...
  22. Re: directory name must immediately follow -I compile error

    Well that would be annoyingly simple. I need to go back a bit and test that. Why would all the other versions of gcc that this compiles under not care about the extra space?

    LMHmedchem
  23. Re: directory name must immediately follow -I compile error

    The opensuse version of g77 is 3.3.3-hammer. Under cygwin, the version is 3.4.4. I would have to open the cent VM to check, but I think that is 3.4 as well. I have compiled this src under cygwin and...
  24. directory name must immediately follow -I compile error

    Hello,

    I am trying to compile some code under opensuse 12.2. The code compiles fine under cygwin and CentOS. Under suse, I get the error "directory name must immediately follow -I"

    This is the...
  25. Replies
    8
    Views
    563

    Re: reverse sort not sorting???

    I guess I should have indicated that I was posting pseudo code, at least for the assignments. These vectors are populated with push_back and I have printed them to confirm their contents. This src...
Results 1 to 25 of 254
Page 1 of 11 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center