Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: mrhegemon
  • Content: Threads
  • Order by date
  1. mrhegemon

    About dynamic memory allocation

    Are you not allowed to use the delete[] operator on an array that was dynamically allocated in a function with new? e.g., void func1() { ... double *a; func2(a); delete[] a; ... } void func2(double *a) { ... a = new double[N]; ... } I am confused about this...
  2. mrhegemon

    Problem with atoi()

    I am having a problem with atoi() in this function. It works correctly in Windows, putting a shiftAmount that corresponds to the two digits, but fails under Linux/UNIX where, for example, a 2 and a 3 get made into 20 + 32 = 52 instead of 20 + 3 = 23. What's wrong? Is it because I declared my...
  3. mrhegemon

    Problem reading block of data from file

    I want to read a block of data from an ifstream into an array of doubles. However, the function .read(char* buffer, int size) does not allow me to put the pointer for the double array into where it requires a char pointer. I don't understand why there is this limitation, or how to get around...
  4. mrhegemon

    Problem passing array

    I am trying to pass the array "da" from the non_linear_min function to the lev_mrq_min_step function, have it filled with values, and then return it to add it into another array. The problem is, the "da" array appears to be given proper values from it's assignment in the...
  5. mrhegemon

    Passing functions as parameters

    I would like to be able to pass a particular function to another function so that I may call that specific function from within the function it was passed to, i.e.: double func2(int a,long b,double c); double *func1(long a,long b,*func2(...)) { ...; func2(...); ..; } How does one go...
  6. mrhegemon

    Question about Packard Bell BIOS

    Please don't laugh, as I know just how horrible Packard Bells are. However, I want to use my old 486 box to test UNIX and Linux on. The problem is that all of the distributions I want to install are best installed from CDs and this computer does not appear to have the ability to boot from the...
  7. mrhegemon

    Trouble passing arrays between functions.

    I have written a function to calculate the n-degree polynomial fit of a given data set. I made the function in an external file and linked it to another program with a header file. I want it to do something like this, where a is an array for holding the polynomial coefficients: //main program...
  8. mrhegemon

    Reading long doubles from a binary file

    Okay, I was able to get my program to correctly write the raw value of my variable to the file. I am now trying to make another program to allow me to convert the binary data file to a formatted string file just in case I would like to have the data human-readable. Unfortunately, I am getting...
  9. mrhegemon

    Writing long doubles to file

    I would like to write the value of a long double variable to a file, but NOT in a formatted string. I want the raw 8 bytes of the number so I can keep all the precision without writing a 25-30 byte string representing the number. How is this done? Thanks for any help.
  10. mrhegemon

    Problem with simple program in NASM

    I am trying to learn how to program assembly and I am starting on a Linux system with the NASM compiler. I have written an include file for my program that contains macros for system calls, so I can make system calls more conveniently. Unfortunately, I am getting a compiler error at line 3...
  11. mrhegemon

    Problem with simple program in NASM

    I am trying to learn how to program assembly and I am starting on a Linux system with the NASM compiler. I have written an include file for my program that contains macros for system calls, so I can make system calls more conveniently. Unfortunately, I am getting a compiler error at line 3...

Part and Inventory Search

Back
Top