Search:

Type: Posts; User: Kaiser

Search: Search took 0.00 seconds.

  1. Replies
    8
    Views
    1,941

    Ah, thanks for the quick reply. Seems like that...

    Ah, thanks for the quick reply. Seems like that was it.
  2. Replies
    8
    Views
    1,941

    copy() segfaults

    Does anyone know why the following code segfaults? Valgrind gives me no hints.
    I compile with 'g++ knas.cpp -pedantic -Wall -ansi -g -o knas' and get no errors/warnings.


    #include <algorithm>...
  3. Replies
    4
    Views
    3,203

    That is simple to tell, since there's a function...

    That is simple to tell, since there's a function called eof() in ifstream, which returns true if you're at the end of file and false otherwise.

    And yes, I could easily post the code for this, but...
  4. Replies
    4
    Views
    3,203

    Start by taking one value from each file (say x...

    Start by taking one value from each file (say x comes from A and y comes from B).

    P: Now compare x and y, record the smallest to a file, remember the other one. If x was the smallest, read a new...
  5. Replies
    5
    Views
    1,022

    I tink that was what I was looking for, thank...

    I tink that was what I was looking for, thank you! It's too late to try it now, but tomorrow.. :)
  6. Replies
    24
    Views
    2,159

    Well I did update my code, so just check it. It...

    Well I did update my code, so just check it. It should be really simple to understand as well.
  7. Replies
    24
    Views
    2,159

    Oh, I had done a bracket typo in my code. It is...

    Oh, I had done a bracket typo in my code. It is functional now.

    The reason it outputted strange characters was that I forgot to terminate the string with a '\0'. And I had forgot to increment i in...
  8. Replies
    5
    Views
    1,022

    cols is not the same as columns, and should not...

    cols is not the same as columns, and should not be.

    I have a matrix A of type [m x n]. In that matrix, I want to have an operator* which will take a matrix B of type [n x p] as an argument, and...
  9. Replies
    24
    Views
    2,159

    My code works perfectly well. If you please post...

    My code works perfectly well. If you please post yours it will be easier to find what you are doing wrong.
  10. Replies
    7
    Views
    7,538

    I took a look at the SVG example file...

    I took a look at the SVG example file http://www.w3schools.com/svg/rect1.svg
    So in practice I just output an identical document, except for the height and width variables.


    #include <fstream>...
  11. Replies
    7
    Views
    7,538

    To me that seems quite easy. First create a SVG...

    To me that seems quite easy. First create a SVG document with a rectangle, take a look at the source. Now, what depends on user input?

    Where is the problem? What have you done so far?
  12. Replies
    7
    Views
    7,538

    With SVG, do you mean Scalar Vector Graphics? In...

    With SVG, do you mean Scalar Vector Graphics? In that case, what exactly do you want to output as an SVG document?
  13. Replies
    24
    Views
    2,159

    The copying is already done, so you just output...

    The copying is already done, so you just output it. The entire program would look something like this:



    int main() {
    char Fname[10];
    char Lname[10];
    char Fullname[20];
    cout <<...
  14. Replies
    24
    Views
    2,159

    I don't get the question. I though you wanted to...

    I don't get the question. I though you wanted to 'cin >> Fname;' and 'cin >> Lname;', and then do the copying.

    When working with arrays, the assignment operator does not do what you might think....
  15. Replies
    24
    Views
    2,159

    His code is perfectly correct, but as you said in...

    His code is perfectly correct, but as you said in the first post that you are not to use any built in string handling, it is not what you asked for.
  16. Replies
    24
    Views
    2,159

    First of all, you need to define Fullname as an...

    First of all, you need to define Fullname as an array of 20 characters (including null termination), as 'char fullname[20];'. The loop(s) could be something like:



    int i = 0;
    while (Fname[i]...
  17. Replies
    24
    Views
    2,159

    Yes, but if you had taken the time to read his...

    Yes, but if you had taken the time to read his message, you would have known that was not what he wanted to do.

    peckitt99:
    In your code, Fullname cannot possibly store the concatenated string,...
  18. Replies
    5
    Views
    1,022

    Template arguments

    I am implementing a class for matrices (the mathematical object), and I am unsure how the definition for the multiplication operator should look. My class is defined as:


    template <class T, int...
Results 1 to 18 of 18