Search:

Type: Posts; User: joni

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Thread: query on xterm?

    by joni
    Replies
    4
    Views
    1,541

    The colours are controlled by "X resources" and...

    The colours are controlled by "X resources" and you can change them by editing a configuration file in your home directory http://xwinman.org/resource.php
  2. Replies
    59
    Views
    11,760

    Actually the JDS is simply a branded version of...

    Actually the JDS is simply a branded version of the GNOME desktop which is written entirely in C, together with programs most of which are written in C (StarOffice, Evolution, Mozilla). Despite the...
  3. Replies
    14
    Views
    1,450

    > simple txt file (~950mb) You do have got...

    > simple txt file (~950mb)

    You do have got well over 1GB of RAM on you computer, right?
  4. Thread: Maths Help

    by joni
    Replies
    10
    Views
    2,537

    There's a much simpler solution that involves...

    There's a much simpler solution that involves solving only one quadratic equation.. to obtain points where the line crosses the circle, substitute y = 2x + k in the circle's equation x²+y²-2x+4 = 0....
  5. Replies
    3
    Views
    1,049

    FAQ:...

    FAQ: http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1042005782&id=1043284385
  6. Replies
    24
    Views
    2,343

    in my opinion tests like this tend to be more...

    in my opinion tests like this tend to be more readable if you don't change the direction of the comparisons and write "myint is between 10 and 20" as "10 <= myint && myint <= 20". It looks more like...
  7. Replies
    37
    Views
    2,909

    You don't seem to be getting what the union of...

    You don't seem to be getting what the union of two sets really is...

    The union contains all of the elements from both of the sets. Therefore the union is easily constructed by inserting all of the...
  8. Replies
    37
    Views
    2,909

    The union of two sets is the set that contains...

    The union of two sets is the set that contains all of the elements in the two sets. You can construct the union by first making an empty set and then inserting into it all elements from one set and...
  9. Replies
    37
    Views
    2,909

    Well, like it says, the compiler is expecting to...

    Well, like it says, the compiler is expecting to find a ")" before the word "result" on line 56. It doesn't get plainer than that. You are missing a closing parenthesis.
  10. Replies
    37
    Views
    2,909

    Have you tried it? Is your class called...

    Have you tried it?

    Is your class called stringset or StringSet? You use both.

    The function is declared to return StringSet but you don't have a "return" statement.
  11. Replies
    37
    Views
    2,909

    > result = contents[i]; Instead of setting...

    > result = contents[i];

    Instead of setting result to contents[i], you want to insert contents[i] to the result. So something like

    result.insert(contents[i]);
  12. Thread: Subset

    by joni
    Replies
    4
    Views
    1,226

    Hint: suppose your set is A = {a1, a2, ..., aN}....

    Hint: suppose your set is A = {a1, a2, ..., aN}. Suppose P(A) is the set of all subsets of A.

    Then P(A) = subsets of A that don't have a1 + subsets of A that do have a1, or:

    P(A) = P(A\{a1}) +...
  13. Replies
    11
    Views
    3,947

    Have you done any programming at all before? ...

    Have you done any programming at all before?

    C++ might not be the easiest programming language to learn first. Learning to program is more about learning how to handle variables, conditional...
  14. Replies
    37
    Views
    2,909

    The intersection of two sets is the set that...

    The intersection of two sets is the set that contains the elements that are present in both of the two sets. That is, if c is an element in "this" set, then c is in the intersection if and only if...
  15. Thread: More Unix Woes

    by joni
    Replies
    2
    Views
    859

    Instead of "test.txt" you use argv[1]. But of...

    Instead of "test.txt" you use argv[1]. But of course you should first check that there is a command line argument, so


    if (argc > 1)
    {
    infile.open(argv[1]);
    }
    else
    {
    tell the user s/he...
  16. Thread: Unix problems

    by joni
    Replies
    9
    Views
    1,970

    The code compiles with some warnings and produces...

    The code compiles with some warnings and produces this output:

    09:25 ~> g++ -Wall stupid.cpp
    stupid.cpp: In function ‘int main()’:
    stupid.cpp:11: warning: unused variable ‘wordcount’...
  17. Replies
    2
    Views
    1,150

    1) Optics and lots of linear algebra and...

    1) Optics and lots of linear algebra and numerical math. You can use formulas you find from the internet but if you actually understand it all you'll have fewer problems. You will need to know how to...
  18. Replies
    33
    Views
    37,200

    You CAN do RSA with small numbers, too. What...

    You CAN do RSA with small numbers, too. What happens is that it's much easier to crack.

    In the heart of RSA is modular exponentation. You don't calculate it by first taking the exponent and then...
  19. Replies
    2
    Views
    1,462

    > A j[] = {A(1),B(2)}; This is the same as A...

    > A j[] = {A(1),B(2)};

    This is the same as
    A j[] = {A(1),A(B(2))};
    Note that an object of B is created to initialize an object of A and then promptly thrown away. If you printed something from...
  20. Thread: classes

    by joni
    Replies
    2
    Views
    830

    What are you really trying to do? If you could...

    What are you really trying to do?

    If you could compile the code you posted, what do you think happens when you create an object of A1? It will create an object of B2, which in turns creates an...
  21. Replies
    2
    Views
    3,254

    > imag1= (((sqrt(b*b-4*a*c))/(2*a))) ; Here...

    > imag1= (((sqrt(b*b-4*a*c))/(2*a))) ;

    Here bē-4ac is negative, so you are calculating the square root of a negative number. You need:

    imag1= sqrt(-d)/(2*a) ;

    (You had already calculated d =...
  22. Replies
    4
    Views
    1,453

    This prints out $12,345.68: ...

    This prints out $12,345.68:

    std::cout.imbue(std::locale("en_US"));
    std::cout << std::fixed << std::setprecision(2);
    std::cout << "$" << 12345.678 << std::endl;(Don't forget that...
  23. Thread: Strings...

    by joni
    Replies
    2
    Views
    955

    > ~AminaRPGEngine(): You wrote a colon there,...

    > ~AminaRPGEngine():

    You wrote a colon there, it should be a semi-colon.
  24. Thread: Scope Question

    by joni
    Replies
    9
    Views
    1,056

    Either you declare a local xrot variable so...

    Either you declare a local xrot variable so "xrot" there is not the global xrot, 'key' is never 'x', or you reset the value of the xrot variable after the assignment.

    You shouldn't be using a...
  25. Replies
    7
    Views
    4,979

    Thanks SlyMaelstrom and MadCow, strerror does...

    Thanks SlyMaelstrom and MadCow, strerror does seem to work even though I had doubts about it.

    It doesn't seem to co-operate with exceptions though. Is there a way to get a meaninful error message...
Results 1 to 25 of 65
Page 1 of 3 1 2 3