User Profile

Collapse

Profile Sidebar

Collapse
gdarian216
gdarian216
Last Activity: Jul 1 '09, 04:28 PM
Joined: Oct 5 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • gdarian216
    replied to question on c++ code
    in C
    these are the error messages I got.

    Code:
    log_view.cpp: In function âstd::vector<Log_Entry, std::allocator<Log_Entry> > parse(std::string)â:
    log_view.cpp:38: error: no matching function for call to âLog_Entry::Log_Entry(std::string&)â
    log_view.hpp:41: note: candidates are: Log_Entry::Log_Entry()
    log_view.hpp:40: note:                 Log_Entry::Log_Entry(const Log_Entry&)
    log_view.cpp:
    ...
    See more | Go to post

    Leave a comment:


  • gdarian216
    started a topic question on c++ code
    in C

    question on c++ code

    I am writting a program that has three different files and is compiled by a Makefile. The goal is to take a file of text and split it up in different sections and stored in vectors. Then it outputs the information in a standard format. The main is fine and my function declarations are good also I am just having trouble writing the functions. Below are the function names and what they need to do. I have been trying some different ways to write the...
    See more | Go to post

  • gdarian216
    started a topic question on a problem
    in C

    question on a problem

    I am working on an assignment and it is asking for IPC(instruction s per cycle) and I dont have a formula to figure it out can anyone help. I am given clock rate, instruction number, and time. Its more detailed then what I am asking but w/ a formula I can do the rest.
    See more | Go to post

  • gdarian216
    replied to question on mips code
    in C
    i wasn't sure Is there a simulator that I can test out my code because it was done in my head and when i handed it in my teacher said it had some bugs in it but didn't tell me where
    See more | Go to post

    Leave a comment:


  • gdarian216
    replied to question binary representations
    in C
    how would the bitwise function help.........i wrote a short program

    Code:
    #include<iostream>
    using namespace std;
    
    int main()
    {
    
    float i = 0.0;
    i = 0.1;
    cout << &i;
    
    }
    and i get 0xbfe392f4-

    how would i get the bit value?...
    See more | Go to post

    Leave a comment:


  • gdarian216
    started a topic question on mips code
    in C

    question on mips code

    the following program is trying to copy words from the address in register $a0 to the address in register $a1, counting the number of words copied in register $v0. It will then stop copying when it finds a word equal to 0. i wasnt tring to preserve the contents of register $v1,$a0,$a1. the terminating word should be copied but not counted.

    this is what i have so far can anyone show me the buggs

    Code:
            addi $v0, $zero,
    ...
    See more | Go to post

  • gdarian216
    started a topic question binary representations
    in C

    question binary representations

    im doing conversions with two's complement binary numbers and i have some questions.

    how can I convert -2047 into a base 2 complement number? I know how to read the binary but there has to be a way to convert it I just don't know how.

    I also was trying to figure out how to convert MIPS binary representation for the floating-point number 0.1.


    also i solved these and wanted to make sure I was understanding...
    See more | Go to post

  • gdarian216
    started a topic question on two lines of code
    in C

    question on two lines of code

    I was trying to read this code and see what it does and I know it is a fuction to a bigger code and is passed some arguments I just had a couple of questions. the first one is temp part of the language since they didn't declare it and the part of the code in bold im not sure what those lines do. Can anyone help

    string::size_ty pe loc;
    if(loc==string: :npos);



    Code:
    vector<string> split(const string& temp,
    ...
    See more | Go to post

  • gdarian216
    started a topic question on mips and code
    in C

    question on mips and code

    hey I have a question on understanding a few things. Im trying to understand
    the following structure of a instruction register.
    Op code, Address-1, Address-2, are 6 bits, 18 bits, 18 bits respectively

    What is the maximum number of distinct operation codes that can be recognized and executed by the processor on this machine?

    would this be 64 which is base 2 to the 6th. or am i doing it wrong
    ...
    See more | Go to post

  • okay what I was tring to do is get a line of a file that has a numbers and spaces in it

    sample file line:
    Code:
    131.123.47.176 - - [18/Sep/2002:12:05:25 -0400] "GET /~darci/ HTTP/1.0" 200 5625
    198.143.205.166 - - [18/Sep/2002:12:06:06 -0400] "GET /~reichel/b.jpg HTTP/1.1" 200 16514
    24.203.197.200 - - [18/Sep/2002:12:06:46 -0400] "GET /~jkuleck/bannerbar.gif HTTP/1.1" 304 -
    4.19.70.66
    ...
    See more | Go to post

    Leave a comment:


  • gdarian216
    started a topic im getting a segmentation error can anyone help
    in C

    im getting a segmentation error can anyone help

    I am writting a code that opens a file and take input a line at a time. It would store that line of info in a string and then I want to split that string up into little strings and store those strings in a vector. This is what I have so far but im getting an error can anyone help me with this.

    #include <iostream>
    #include <fstream>
    #include <string>
    #include <vector>
    using namespace...
    See more | Go to post

  • question on loading a string from a file into a vector

    Okay I am writting a program that will take input from a file and store it in a string. Then the string is separated at the whitespaces and these separate strings are loaded in a vector. My problem is that how would I index the vector so that the strings I input can be put in a class?

    okay I have a .h file that looks like this......

    Code:
    // struct, all members are public.
    struct Date
    {
        Date()
    ...
    See more | Go to post

  • gdarian216
    started a topic why function isn't counting words
    in C

    why function isn't counting words

    I am writting a code that opens a file and gets the file name from a command line argument. I then open an output stream to print results of functions in a separate file. I have written a function and it isn't doing what I want it to. It is suppose to count the words in the file that was opened.

    the word_count function only incruments once giving a word count of one and I can figure out why. Can anyone help?

    this is...
    See more | Go to post

  • gdarian216
    started a topic question on command line code
    in C

    question on command line code

    okay I had a code that asked user to input a file name and instead i changed it to take the input from the command line.

    I now want to output results of some functions to an output file. I have one function that is suppose to count the words in the file but it isnt working

    I have a test file with two lines in it.
    Code:
    abc def ghi gk
    
    ades
    and my program will output the file with the correct...
    See more | Go to post

  • gdarian216
    replied to Error : undefined reference to
    in C
    do u mean something like this

    void get_score(recor ds&,float&)

    but that would pass it by reference.

    how would I make it a pointer?
    See more | Go to post

    Leave a comment:


  • gdarian216
    replied to Error : undefined reference to
    in C
    I thought I was passing a pointer. What did I do wrong
    See more | Go to post

    Leave a comment:


  • gdarian216
    replied to Error : undefined reference to
    in C
    i changed that and now I got this


    test.cpp: In function `int main()':
    test.cpp:63: error: cannot convert `records' to `records*' for argument `1' to `void average_quizes( records*, float&)'
    See more | Go to post

    Leave a comment:


  • gdarian216
    started a topic Error : undefined reference to
    in C

    Error : undefined reference to

    im getting an error and I dont know why can anyone help.

    this is the error......

    Code:
    /tmp/ccxaenRY.o(.text+0x375): In function `main':
    : undefined reference to `average_quizes(records, float&)'
    collect2: ld returned 1 exit status



    [CODE=cpp]#include <cstdlib>
    #include <iostream>
    #include <string>
    #include <vector>
    #include...
    See more | Go to post

  • gdarian216
    replied to question on c++ program using structs/classes
    in C
    so for the most part the functions that need to use my class members should go in the public part. and then the other functions should be okay
    See more | Go to post

    Leave a comment:


  • gdarian216
    replied to question on c++ program using structs/classes
    in C
    okay I got that now lets say i have created these

    Code:
    public:
            void set_name(ifstream& in_file);
            void set_quizes(ifstream& in_file);
            void set_projects(ifstream& in_file);
            void set_exams(ifstream& in_file);
            void set_labs(ifstream& in_file);
    and this is the one for the string member

    Code:
    void records::set_name(ifstream&
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...