Search:

Type: Posts; User: ManyTimes

Search: Search took 0.00 seconds.

  1. To M.Richard Tober: I am sorry. I have a mistake...

    To M.Richard Tober: I am sorry. I have a mistake in the first post.

    The sellerID is mixed up here, in the first post. It is actually 3 1 3 1, this can be "easily" viewed if you look at the cost,...
  2. Replies
    3
    Views
    1,432

    Hello, as phantomotap says: tried anything? Show...

    Hello, as phantomotap says: tried anything? Show the code.

    std::vector can be initialized just when you are creating it, like this:

    //Creates 2D vector of size 10 and the 0 in the line below...
  3. You're almost there, but then again not. :) ...

    You're almost there, but then again not. :)

    >>"Given Car #1, then Seller ID #1 is the cheapest." True
    Almost, take the service-cost into consideration if a seller gets picked (is the cheapest,...
  4. Algorithm, getting the lowest/cheapest combination out of some "complex data"

    Hello!

    For sake of the example, there are sellers who sells cars, where each car has its own price from different seller. A seller also has an additional service price which will always be added...
  5. Why do you guys always spam a thread with posts...

    Why do you guys always spam a thread with posts that are not topic related? Post count ftw? Do not answer!

    I have asked for "Any other ideas?", which mean if anyone has another way of doing this...
  6. int a; int b[4]; b[1] = 1; b[2] = 5; b[3] = 3 ...

    int a;
    int b[4];
    b[1] = 1; b[2] = 5; b[3] = 3

    for(int i = 1; i < 4; i++)
    {
    for(int ii = 1; ii < 4; ii++)
    {
    if(b[ii] < b[i])
    {
  7. syzgy: I know, I could have put all three classes...

    syzgy: I know, I could have put all three classes actually inside one class, but thats not the point. That did not answer your question; "What is the point of doing that?".

    Doing what? The last...
  8. Hmm... No idea what that is. *googling* I am...

    Hmm... No idea what that is. *googling*

    I am sort of looking for that, I think... but, take this sample:



    class A
    {
    private:
    int a;
  9. Class-dilemma; One variable should contain all three classes

    Lets say I have these three classes, I mean, lets just not say, but I really have these three classes and they cannot be changed;


    class A
    {

    };

    class B : public A
    {
  10. Replies
    4
    Views
    3,652

    Classes with seperate .h and .cpp file

    File: Test.cpp

    #include <iostream>
    using namespace std;

    Test()
    {
    name = "Abc";
    cout << name;
    }
  11. Replies
    8
    Views
    1,139

    CodeBlocks? http://www.codeblocks.org/ MS...

    CodeBlocks?
    http://www.codeblocks.org/

    MS tools are only good for MS stuff, but if any, VS 2008 Express or wait a bit for 2010?

    Else; eclipse is really neat....
  12. Replies
    4
    Views
    2,537

    while "letter" is less than Z, which it will be...

    while "letter" is less than Z, which it will be at least the first time, because you've just set it to 'A'. what about the second time the while loop runs?

    Next time the loop goes on, It is still...
  13. Replies
    8
    Views
    2,258

    >>pass variable from one function to another ...

    >>pass variable from one function to another


    void Function1(int i)
    {
    cout << i;
    }

    int main()
    {
  14. Replies
    19
    Views
    29,224

    Dijkstra's algorithm - Wikipedia, the free...

    Dijkstra's algorithm - Wikipedia, the free encyclopedia
    Dijkstras algorithm... with a code there already, so... :)
  15. Replies
    1
    Views
    2,218

    You should have shown some code... Useless to...

    You should have shown some code... Useless to help elsewise... Kind of! :P

    But, I made one little thing up for you, hope it helps you in the right direction! :)


    #include <iostream>
    #include...
  16. Replies
    5
    Views
    2,293

    >>Now I'm just trying to get it to only accept...

    >>Now I'm just trying to get it to only accept positive input numbers.
    So, you want the "int cost" variable, to make sure it is positive, at all times? Right?

    I would have created a new function...
  17. Replies
    6
    Views
    1,061

    Well... A for loop looks like this (or better...

    Well...

    A for loop looks like this (or better said; it can look like this)

    for(int i = 0; i < 10; i ++)
    {
    cout << "Value of integer variable i: " << i;
    }

    If you want to do a thing, at...
  18. Replies
    2
    Views
    1,234

    Jesus holy... I needed a "innfil.ignore()"; It...

    Jesus holy...

    I needed a "innfil.ignore()"; It solved everything, I see now, it doesnt know when to "jump to the next line", unless i tell it to do so...
  19. Replies
    2
    Views
    1,234

    Reading a class object from ASCII file...

    #include <iostream> // cin, cout
    #include <fstream> // ifstream, ofstream
    #include <cstring> // strcpy, strlen, strncmp
    #include <cctype> // toupper...
  20. Thanks, but next time instead of writing two...

    Thanks, but next time instead of writing two lines which actually don't answer my question, just write the little "snippet" down instead?
    For instance:
    int i= char[4]-'0';

    Because, I know what...
  21. Converting a char* to int, why is that so hard?!?!

    int main()
    {
    char* c = "123456";
    int i = atoi(c[3]);
    //i = (int)c[3];
    //i = atoi((char*)c[3]);
    //i = atoi((char)c[3]);
    //char cc = (char)c[3]; i = atoi(cc);
    //none works, what in the......
  22. Replies
    2
    Views
    2,495

    Thanks for responding. 1. Ok, next time I'll do...

    Thanks for responding.
    1. Ok, next time I'll do that! :)

    2. Nice thinking, of course privatize it!

    3. Huh? So what should I do then? I try to read from the file a "line" in the size of my...
  23. Replies
    2
    Views
    2,495

    Reading a class object from a file...

    Hello!

    How can I read a class object from a file that I have just written to.

    The class

    class Hired
    {
    private:
    int nr;
  24. Works now! Lovely, love you! Knew it was simple,...

    Works now! Lovely, love you! Knew it was simple, just... :)
  25. Help in writing a class to file and calling a constructor (fairly simple)

    Hello!

    I got one class named Hired and want to write the whole class into a file. But upon execution the program stops and ends without even create the file.
    Also; how do I call the construtor...
Results 1 to 25 of 25