Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: C or C++ book?

                  
   
  1. #11
    DCEmu Legend ACID's Avatar
    Join Date
    Feb 2006
    Location
    6 Feet Under
    Posts
    2,348
    Rep Power
    87

    Default

    Quote Originally Posted by the zack
    you know what is pissing me off? I am trying to make helloworld with my new C++ book but when I compile it it just exits right out of it before I can even see it. here is the code:

    #include <iostream>

    int main()
    {
    std::cout << "aloaldafgd\n";
    return 0;
    }
    Wheres the rest of the code:

  2. #12
    DCEmu Legend gunntims0103's Avatar
    Join Date
    May 2006
    Location
    Brentwood, NY
    Age
    34
    Posts
    2,976
    Rep Power
    112

    Default

    i need some brushing up for some codes on lua any e-books/sites that someone could direct me too......actually i might just head to barnes and nobles and pick up a copy of LUA the programming launguage and c/c+ for dummies

  3. #13

    Default

    #include <iostream>

    int main()
    {
    std::cout << "aloaldafgd\n";
    return 0;
    }

    its not really an error,go to cmd and just browse to where the exe is,to make life easier replace reture 0 with

    while (1);

  4. #14
    DCEmu Newbie
    Join Date
    Oct 2006
    Posts
    10
    Rep Power
    0

    Default

    thank you gamehunter101 you solved my problem!

  5. #15
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    87

    Default

    #include <iostream>

    int main(int arg, char ** argv)
    {
    std::cout << "Hello World" << std::endl;
    char temp;
    std::cin >> temp;
    return 0;
    }
    This waits for input before closing. Without cin, the app will print "aloaldafgd" and close hence you just see it 'flash'.

  6. #16

    Default

    Quote Originally Posted by yaustar
    This waits for input before closing. Without cin, the app will print "aloaldafgd" and close hence you just see it 'flash'.
    thanks for that one

  7. #17
    DCEmu Newbie
    Join Date
    Oct 2006
    Posts
    10
    Rep Power
    0

    Default

    Hey I need a little help on something. I am trying to make a program (that I will actually use in real life) where you input a word and it would return a corresponding word, for example: "hello" would returrn "hi to you too", and in the same program if you input for example "nice hat" it would return "thanks i got it at target". I tried to make an if statement for it but I just doen know where to start. can somebody start me out on a template of some kind they could write out?

    I am using this for debate class, I have a laptop, so if I write the case name "coast guard" then it would return various arguements to use against the case. i also want to be able to ask other questions to the program, so it can narrow down its outputs.

  8. #18
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    87

    Default

    Depending on your level of programming, it will be very tough to do. You will need to at least implement a text parser to analyse the key words such as verbs and nouns. These can be written in a seperate file as a list that can be loaded in at the start of the program.

    Then you have to create a system for the reply which should be able to construct a (legal) sentence based on keywords from the input.

    Not easy.

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •