Search:

Type: Posts; User: omGeeK

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,057

    C/System calls help

    This is on UNIX


    #include <stdio.h>
    #include <unistd.h>
    #include <sys/types.h>
    int main(int argc,char **argv)
    {
    int pid,pid1,pid2,pid3;
  2. Replies
    0
    Views
    1,486

    Wait for key event

    Alright so my code below works but it does not wait for a key to be pressed it just reads it once and then goes on its way. How would I go about waiting for a key pressed event to occur and then use...
  3. Replies
    14
    Views
    4,117

    Nevermind I FIGURED IT OUT!! I've have spent...

    Nevermind I FIGURED IT OUT!! I've have spent countless hours staring at the code. And I feel like an idiot that I didn't even try changing this the code for my copy constructor is


    //copy...
  4. Replies
    14
    Views
    4,117

    Yes this a lab for school, and requires that we...

    Yes this a lab for school, and requires that we learn dynamic memory allocation with raw pointers. It sucks because my professor barely covered anything related to the topic so I have been learning...
  5. Replies
    14
    Views
    4,117

    I feel like the problem resides somewhere within...

    I feel like the problem resides somewhere within my list (vector of matrices). Something about local heap errors occur when I use things from the list.

    But what doesn't make sense to me is that...
  6. Replies
    14
    Views
    4,117

    I could care less this is for school about the...

    I could care less this is for school about the security of it :). but for 2d then do a = [1 2 3 ; 1 2 3 ] the ; seperates rows
  7. Replies
    14
    Views
    4,117

    Alright well the code is pretty long so cheers...

    Alright well the code is pretty long so cheers lol. But the program will not run in release mode at all. But when I comment out the destructors code, it works fine in debug mode with no debugging.
    ...
  8. Replies
    14
    Views
    4,117

    The thing that is confusing me is that the right...

    The thing that is confusing me is that the right memory I want to delete is actually in the destructor. So I have no clue why delete[] won't work on it. Some more background info, is that I try...
  9. Replies
    14
    Views
    4,117

    clear void Matrix::clear(void) { ...

    clear

    void Matrix::clear(void)
    {
    Matrix temp;
    swap(temp);
    }

    Assignment operator
  10. Replies
    14
    Views
    4,117

    Dynamic Memory Problem

    Alright so I have a class of Matrix which looks like

    class Matrix
    {
    private:
    string _name;
    int errorInput;
    int _row;
    int _col;
    double ** _mat;
  11. Replies
    34
    Views
    4,225

    Alright I'm back with some heap errors. I have...

    Alright I'm back with some heap errors. I have debugged the crap out of it and I don't understand the problem. At random points when my destructor gets called I will get heap errors even though I...
  12. Replies
    34
    Views
    4,225

    Ugh alright thanks, guess Ill be hitting up...

    Ugh alright thanks, guess Ill be hitting up Google all night..
  13. Replies
    34
    Views
    4,225

    Alright, Ill have to work on that but I have...

    Alright, Ill have to work on that but I have another quick question :biggrin:


    //sets the data of a matrix given a matrix operator overloading
    Matrix & Matrix::operator = (const Matrix &...
  14. Replies
    34
    Views
    4,225

    //transpose a matrix Matrix...

    //transpose a matrix
    Matrix Matrix::transpose(void)
    {
    int i,j;
    if(this->_mat != NULL)
    {
    Matrix mtemp(*this);
    this->clear();
    _row = mtemp._col;
    _col = mtemp._row;
  15. Replies
    34
    Views
    4,225

    #include "Matrix.h" //default constructor...

    #include "Matrix.h"
    //default constructor
    Matrix::Matrix()
    {
    _name = "Unknown";
    _row = 0;
    _col = 0;
    _mat = NULL;
    }
    //copy constructor call
  16. Replies
    34
    Views
    4,225

    #include "Matrix.h" //default constructor...

    #include "Matrix.h"
    //default constructor
    Matrix::Matrix()
    {
    _name = "Unknown";
    _row = 0;
    _col = 0;
    _mat = NULL;
    }
    //copy constructor call
  17. Thread: completely lost

    by omGeeK
    Replies
    9
    Views
    1,914

    True, but if you know you want to initialize to...

    True, but if you know you want to initialize to zero why not lol
  18. Thread: completely lost

    by omGeeK
    Replies
    9
    Views
    1,914

    int test[100] = {0}; Is a much simpler way of...

    int test[100] = {0}; Is a much simpler way of initializing an array to zero than calling a function like that as long as you want to initialize it to 0.
  19. Replies
    34
    Views
    4,225

    #include "Matrix.h" //default constructor...

    #include "Matrix.h"
    //default constructor
    Matrix::Matrix()
    {
    _name = "Unknown";
    _row = 0;
    _col = 0;
    _mat = NULL;
    }
    //copy constructor call
  20. Replies
    34
    Views
    4,225

    Thanks fixed a bunch of stupid errors. I have...

    Thanks fixed a bunch of stupid errors. I have been staring at this code for a while and clearly not really paying attention.
  21. Replies
    34
    Views
    4,225

    #pragma once #include #include...

    #pragma once
    #include <vector>
    #include <string>
    #include <sstream>
    #include <deque>
    #include <iostream>
    #include <iomanip>
    using namespace std;

    class Matrix
  22. Replies
    34
    Views
    4,225

    Vector for what?

    Vector for what?
  23. Replies
    34
    Views
    4,225

    Thanks for the heads up but what do you mean by a...

    Thanks for the heads up but what do you mean by a copy constructor? All i have is a default constructor
  24. Replies
    34
    Views
    4,225

    Unhandled exception at 0x01192af2 in ECE264 Lab...

    Unhandled exception at 0x01192af2 in ECE264 Lab 6.exe: 0xC0000005: Access violation reading location 0x00000000.

    thats the error well the only thing i noticed is when i look at iT in debug mode...
  25. Replies
    34
    Views
    4,225

    // Finds matrix with name n in vector mL; returns...

    // Finds matrix with name n in vector mL; returns -1 if matrix not present
    int findMatrix(vector <Matrix> &mL, string n)
    {
    Matrix temp;
    for(vector<Matrix>::iterator iT = mL.begin(); iT !=...
Results 1 to 25 of 97
Page 1 of 4 1 2 3 4