Search:

Type: Posts; User: Mozza314

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    3,790

    Yeah, I'm glad that I've got my head wrapped...

    Yeah, I'm glad that I've got my head wrapped around implicit templates a bit more now.

    However, I'm fairly sure C++ does deal with const const int by collapsing it to const int. For example:

    ...
  2. Replies
    13
    Views
    8,080

    Well, it must be possible, but I'm guessing it'd...

    Well, it must be possible, but I'm guessing it'd be pretty complex unless there's some library out there. Why do you want to use the excel file directly?
  3. Replies
    13
    Views
    8,080

    Not sure how you would do this directly. However...

    Not sure how you would do this directly. However you can save excel files with a single sheet to .csv, which would convert a sheet that looks like this:


    +---+---+
    | 1 | 2 |
    +---+---+
    | 3 | 4...
  4. Replies
    8
    Views
    3,790

    Like this? You have to do this sort of thing with...

    Like this? You have to do this sort of thing with explicit templates anyway right?

    (EDIT: I can make this more clear by making Fronbnicate non-empty)


    #include <iostream>

    template <typename...
  5. Replies
    2
    Views
    3,810

    Dammit boost, lol. I should have known. I'm not...

    Dammit boost, lol. I should have known. I'm not sure if I like it better, I'll have to try it out sometime.
  6. Replies
    2
    Views
    3,810

    printf style output for C++

    I've had a new enthusiasm for exploring the new features in C++11 since the standard was accepted.

    I've come across this before which shows how variadic templates can be used to make a type safe...
  7. Replies
    8
    Views
    3,790

    Ah! You're right! I can see it with this code:...

    Ah! You're right!

    I can see it with this code:


    template <typename T>
    void foo(T t) { t.Fail(); }

    int main()
    {
  8. Replies
    8
    Views
    3,790

    Why? If 3 was a const int then we would have [T =...

    Why? If 3 was a const int then we would have [T = const int]:

    void foo(const int&) { }

    Unless the compilation of this code is also strange to you:


    void foo(const int&) { }

    int main()
  9. Replies
    8
    Views
    3,790

    Literal ints are non-const?

    Could someone please explain to me why a literal integer is an rvalue of type int instead of an rvalue of type const int?

    In particular, it creates this strange situation:


    template <typename...
  10. As Nor pointed out that "if" should be "for"....

    As Nor pointed out that "if" should be "for". However there is another problem here. Notation in maths often gets sloppy, and a < x < b meaning x is between a and b is a good example of this.

    When...
  11. Replies
    4
    Views
    1,189

    Works perfectly for me, maybe you're doing...

    Works perfectly for me, maybe you're doing something weird instead of printing the function's output.


    #include <iostream>

    int recurvsiveFibonacci(int n)
    {
    //there is a breakpoint on...
  12. Replies
    4
    Views
    2,520

    Those are some interesting points you make....

    Those are some interesting points you make. Posting here was part of my search, but I guess I'll keep looking.
  13. Replies
    4
    Views
    2,520

    I have seen that page; it doesn't seem to...

    I have seen that page; it doesn't seem to actually document libavcodec. Digging a little deeper there all I could find was a way to use ffmpeg to convert a series of already created images into a...
  14. Replies
    4
    Views
    2,520

    Cross Platform Video Output

    I'm looking for a cross-platorm (failing that, linux/ubuntu specific) way to output a video file from a C++ program. Doing some research it looks like libavcodec may be something I could use, but I...
  15. Replies
    3
    Views
    12,832

    Personally, I don't bother with pseudocode. If...

    Personally, I don't bother with pseudocode. If you want to write something concrete that makes sense, that's what the language itself is for. I can see some potential for merit for roughly sketching...
  16. Replies
    6
    Views
    1,403

    Lecturers can be pretty insensitive about that....

    Lecturers can be pretty insensitive about that. Probably a tiny error they could have fixed in a few seconds but instead they thought "woohoo this assignment is uber easy to mark".

    Anyway, using...
  17. Replies
    4
    Views
    4,613

    This suggests to me that you're thinking about...

    This suggests to me that you're thinking about '=' in the mathematical way. In C++ and most languages, '=' means something else, it means assignment. For example, it is perfectly legitimate to write:...
  18. Replies
    5
    Views
    1,577

    Please read the homework policy...

    Please read the homework policy.

    If you do that, post some code indicating some effort on your part, and ask specific questions about what you're having trouble with, I'd be happy to help.
  19. Replies
    11
    Views
    3,858

    It involves putting something like this: ...

    It involves putting something like this:


    for( i = 0; i < previousLine.length(); i++)
    {
    cout << "previousLine[" << i << "] = " << previousLine[i] << endl;
    }

    for(i = 0; i <...
  20. Thread: empty

    by Mozza314
    Replies
    15
    Views
    2,256

    Could you check the complexity requirement on...

    Could you check the complexity requirement on std::list::splice in the same draft? As has been mentioned, I don't think it's possible to have constant time size() and splice(), so I guess that means...
  21. Replies
    11
    Views
    3,858

    cin > c; ...

    cin << c;

    this should be:


    cin >> c;



    The idea that you have to use Number.dat as the key suggests that a specific encryption scheme has been given to you. We can't help you very much if...
  22. Interestingly, g++4.4.5, g++4.5 accept the...

    Interestingly, g++4.4.5, g++4.5 accept the assignment using the initializer list, but g++4.6 does not. Just goes to show C++0x support is experimental. To clarify, this is the code I'm talking about:...
  23. I am surprised that this works at all in C++0x....

    I am surprised that this works at all in C++0x. As far as I know initializer lists are only available during initialization, the idea that you can assign to an initializer list is new to me. I'd like...
  24. Thread: Functions

    by Mozza314
    Replies
    2
    Views
    899

    Before coming to us, you should have done...

    Before coming to us, you should have done something like this to see where each number is actually coming from:


    #include <iostream>
    using namespace std;

    int global = 2;

    int rek(int par)
    {
  25. Replies
    5
    Views
    2,520

    Please don't just tell us what you're supposed to...

    Please don't just tell us what you're supposed to do and ask us to do it for you. Instead, ask specific questions relating to your difficulties with those tasks. See the homework policy.

    For...
Results 1 to 25 of 175
Page 1 of 7 1 2 3 4