User Profile

Collapse

Profile Sidebar

Collapse
mikejfe
mikejfe
Last Activity: Nov 21 '07, 02:57 AM
Joined: Feb 6 '07
Location: Nashville, TN
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • mikejfe
    replied to Dev-C++/gcc compile question
    in C
    Honestly, I don't even know what function that is. I didn't knowingly call it. This program is so simplistic; there is no header file and everything I do is completely contained in int main().

    The first few lines of the errors are:
    Code:
    /tmp/ccN8BUK4.o: In function `__static_initialization_and_destruction_(int, int)':
    VoxelizedPhantomResizer.cpp:(.test+0x23): undefiend reference to 'std::ios_base:Init:Init()'
    ...
    See more | Go to post

    Leave a comment:


  • mikejfe
    started a topic Dev-C++/gcc compile question
    in C

    Dev-C++/gcc compile question

    Hi all. I've written a program that dynamically allocates memory for a 3dim array, reads a file into that array, does some stuff to the data in the array and then outputs the array to a file.

    I can compile my program with Dev-C++ and run it all day long on my laptop (Windows XP). The problem with this is my laptop is slow. So, I tried to compile the code with gcc on my Linux box. gcc, however, doesn't seem to like my code.
    ...
    See more | Go to post

  • mikejfe
    replied to ofstream limitations?
    in C
    Banfa, you must be correct about the redundant data. Apparently each piece of information in the original file is 8 bytes long. What kind of redundant data could be in the file that would change the information from 8 bytes to 2 bytes? In my array I store all the information as floats before writing to the file.

    Thanks for your responses. This is definitely a "learning thread" for me.
    See more | Go to post

    Leave a comment:


  • mikejfe
    replied to ofstream limitations?
    in C
    Thanks for your replies.

    I apologize for not putting this in my original post. I'm using XP, Dev-C++, and set up as NTFS. I know this is such a beginners question..ugh.

    Please don't laugh at me but I figured out that when I analyzed the data, my analysis was incorrect. My files are being saved "correctly. "

    However, I do have a related side question: are there any theories why when I save the...
    See more | Go to post

    Leave a comment:


  • mikejfe
    started a topic ofstream limitations?
    in C

    ofstream limitations?

    I wrote a program to read a file, store that information into a 3d array, sort that array, and then write to a file. Should be straightforward . The problem I am running into is within the writing part.

    I've taken the sorting function out.

    For debugging purposes- when the file is written, a counter tells me that all pieces of information have been written, however, by visual inspection the data is jumbled and missing...
    See more | Go to post

  • mikejfe
    replied to Array Creation - Error
    in C
    Great. I'll try spliting the load up. Thank you for your help!

    -Michael
    See more | Go to post

    Leave a comment:


  • mikejfe
    replied to Array Creation - Error
    in C
    I might add that I'm using Windows XP, 1.7GHz Duo, 2GB of memory.

    Thanks.
    See more | Go to post

    Leave a comment:


  • mikejfe
    started a topic Array Creation - Error
    in C

    Array Creation - Error

    Hi all.

    I create an array using this code:
    Code:
    //Variables.h
    extern int *g_x;                                    //x voxel vector
    extern int *g_y;                                    //y voxel vector
    extern int *g_z;                                    //z voxel vector
    extern double ***g_xyz;                        //voxel contents (i.e. organ values)
    
    
    
    //LoadFile.cpp
    ...
    See more | Go to post

  • mikejfe
    started a topic Question about globals
    in C

    Question about globals

    Hi all. I have a question that is probably simple to answer, but I don't even know where to get started (i.e. for searching old posts, Google, etc.)

    I am writing a program that reads in a 3 dimensional array text file. Then x, y, and z coordinate values are assigned to each value of the 3d array. These four arrays (3d array, x, y, z) get used in quite a few functions of my program. So, I define them all as globals.

    ...
    See more | Go to post

  • mikejfe
    replied to Multiple Definition Compile Error
    in C
    It finally compiled! I'm pretty new to writing C++ programs that are more advanced than "Hello World." My grad professor stuck me on a program that requires knowledge of openGL and C++ ... and I've been struggling. Thank you so much for your help!
    See more | Go to post

    Leave a comment:


  • mikejfe
    replied to Multiple Definition Compile Error
    in C
    Hmm. Well I tried a few different things and I still get the multiple definition error. Maybe I didn't quite understand your response (sorry). The header file now reads:
    Code:
    #ifndef ListVars_h
    #define ListVars_h
    
    extern int bonesDL;
    
    #endif
    One thing I tried was adding a new function:
    Code:
    #include "ListVars.h"
    
    void initVars()
    {
    int bonesDL=3;
    ...
    See more | Go to post

    Leave a comment:


  • mikejfe
    started a topic Multiple Definition Compile Error
    in C

    Multiple Definition Compile Error

    Hi all. I am having multiple definition compiling errors. I included the #ifndef, #define, #endif lines in my header files. I've seen a post on here suggesting using extern. That didn't work for me either. This is a snippet from my header file.

    #ifndef ListVars_h
    #define ListVars_h

    extern int bonesDL = 3;
    extern int marrowDL = 4;

    #endif

    If I include ListVars.h into multiple...
    See more | Go to post
No activity results to display
Show More
Working...