Thread: Beginning C++

Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 57
  1. #16
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Quote Originally Posted by lalakijilp View Post
    C++ Beginner's Guide

    maybe an idea to say it is alot of work
    I added it.
    I didn't even bother to add C++ in 21 days. Personally I think that tutorial sucks... =/

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  2. #17
    Marsicano's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Location
    Brazil
    Posts
    371
    Reputation
    16
    Thanks
    67
    My Mood
    Lonely
    A good tip to be here:

    Buy a notebook (not a PC, a notebook, that thing you use to write with pen or pencial at college... lol) and write what you think it's essencial, it will help.

  3. #18
    alerto24's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    noneofyourbusiness
    Posts
    4
    Reputation
    10
    Thanks
    0

    sir

    can i ask you how can i edit a dll file? sorry for my noob question

  4. #19
    zeco's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Canada
    Posts
    683
    Reputation
    12
    Thanks
    78
    My Mood
    Cynical
    Quote Originally Posted by alerto24 View Post
    can i ask you how can i edit a dll file? sorry for my noob question
    Basically You can't. You could disassemble using IDA Pro/OllYDbg or the like, but that is quite complicated and not something you'd be doing in a day, depending of course on the complexity of the DLL. Knowledge of assembly is needed. Basically you aren't editing the DLL, but rather remaking it :/

  5. The Following User Says Thank You to zeco For This Useful Post:

    why06 (10-21-2009)

  6. #20
    =Advocate='s Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    45
    Reputation
    10
    Thanks
    6
    My Mood
    Cheerful
    C primer edition 5 is good but for some reason everything I try in there closes its self
    before I can complete for example:


    // getinfo.cpp -- input and output
    #include <iostream>
    int main()
    {
    using namespace std;
    int carrots;
    cout << “How many carrots do you have?” << endl;
    cin >> carrots; // C++ input
    cout << “Here are two more. “;
    carrots = carrots + 2;
    // the next line concatenates output
    cout << “Now you have “ << carrots << “ carrots.” << endl;
    return 0;
    }

    Right after I type how may carrots it closes,
    I even tried adding cin.get(); still happens though any ideas?

  7. #21
    lalakijilp's Avatar
    Join Date
    Jan 2008
    Gender
    male
    Posts
    310
    Reputation
    9
    Thanks
    53
    My Mood
    Blah
    Quote Originally Posted by =Advocate= View Post
    C primer edition 5 is good but for some reason everything I try in there closes its self
    before I can complete for example:


    // getinfo.cpp -- input and output
    #include <iostream>
    int main()
    {
    using namespace std;
    int carrots;
    cout << “How many carrots do you have?” << endl;
    cin >> carrots; // C++ input
    cout << “Here are two more. “;
    carrots = carrots + 2;
    // the next line concatenates output
    cout << “Now you have “ << carrots << “ carrots.” << endl;
    return 0;
    }

    Right after I type how may carrots it closes,
    I even tried adding cin.get(); still happens though any ideas?
    did you put cin. get () just before return 0;?

  8. #22
    =Advocate='s Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    45
    Reputation
    10
    Thanks
    6
    My Mood
    Cheerful
    Yes I did.

    I did it like this:

    #include <isostream>
    int main()
    {
    usingnamespace std;
    int carrots;
    cout <<"how many carrots do you have?" <<endl; I like \n better :O
    cin >> carrots + 2;
    cout << "Now you have " << carrots << " carrots." <<endl;
    cin.get();
    return 0;
    }
    Last edited by =Advocate=; 10-21-2009 at 01:21 PM.

  9. #23
    lalakijilp's Avatar
    Join Date
    Jan 2008
    Gender
    male
    Posts
    310
    Reputation
    9
    Thanks
    53
    My Mood
    Blah
    using namespace std; should be right after #include iostream and not in int main maybe that is the problem

  10. #24
    =Advocate='s Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    45
    Reputation
    10
    Thanks
    6
    My Mood
    Cheerful
    Hmm even though i changed it it still happends.

  11. #25
    lalakijilp's Avatar
    Join Date
    Jan 2008
    Gender
    male
    Posts
    310
    Reputation
    9
    Thanks
    53
    My Mood
    Blah
    Quote Originally Posted by =Advocate= View Post
    Hmm even though i changed it it still happends.
    post the exact same source code you are compiling

  12. #26
    =Advocate='s Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    45
    Reputation
    10
    Thanks
    6
    My Mood
    Cheerful
    Keep in mind I'm using Visual C++ 2008 Express Edition.

    #include "stdafx.h"
    #include <iostream>

    using namespace std;
    int main()
    {
    int carrots;
    cout << "How many carrots do you have?" << endl;
    cin >> carrots;
    cout << "Here are two more. ";
    carrots = carrots + 2;
    cout << "Now you have " << carrots << " carrots." << endl;
    cin.get();
    return 0;
    }
    Last edited by =Advocate=; 10-21-2009 at 01:34 PM.

  13. #27
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Quote Originally Posted by =Advocate= View Post
    Keep in mind I'm using Visual C++ 2008 Express Edition.

    #include "stdafx.h"
    #include <iostream>

    using namespace std;
    int main()
    {
    int carrots;
    cout << "How many carrots do you have?" << endl;
    cin >> carrots;
    cout << "Here are two more. ";
    carrots = carrots + 2;
    cout << "Now you have " << carrots << " carrots." << endl;
    cin.get();
    return 0;
    }
    occasionally I get these problems too. I think it happens when I run Google Desktop in the background. This is why I just use system("pause"); instead of cin.get();

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  14. The Following User Says Thank You to why06 For This Useful Post:

    =Advocate= (10-21-2009)

  15. #28
    zeco's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Canada
    Posts
    683
    Reputation
    12
    Thanks
    78
    My Mood
    Cynical
    If one cin.get() doesn't work sometimes you need 2. I believe the book outlined things like this near the beginning. And the namespace doesn't have to be under #include, especially in a single function program Like this.

  16. #29
    =Advocate='s Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    45
    Reputation
    10
    Thanks
    6
    My Mood
    Cheerful
    Quote Originally Posted by why06 View Post
    occasionally I get these problems too. I think it happens when I run Google Desktop in the background. This is why I just use system("pause"); instead of cin.get();
    You Sir saved me system("pause"); worked perfectly!

  17. #30
    Katbox's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    15
    Reputation
    10
    Thanks
    1
    My Mood
    Amused
    DON'T USE system("pause);
    It's not always the greatest choice, as sometimes it refuses to work.
    Instead, use cin.get(); twice like this

    cin.get();
    cin.get();

Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Replies: 28
    Last Post: 03-02-2009, 07:44 AM
  2. Replies: 8
    Last Post: 01-30-2009, 07:14 AM
  3. Could help beginer C++ users
    By skittlznick2 in forum C++/C Programming
    Replies: 7
    Last Post: 10-10-2008, 03:23 PM
  4. New Patch... Let the games begin
    By jebadiah in forum Combat Arms Hacks & Cheats
    Replies: 5
    Last Post: 08-22-2008, 09:14 AM
  5. Begin hacking here.
    By tednugent in forum General Game Hacking
    Replies: 0
    Last Post: 06-11-2007, 09:43 AM

Tags for this Thread