GCFH

Geomike's Hacks And Bots


    Snippet Bank.

    Share

    J4cK
    Global Moderator

    Posts : 151
    Reputation : 14
    Join date : 2011-12-19
    Age : 19
    Location : Australia (The land of Beaches, BBQS and Boobs)

    Snippet Bank.

    Post by J4cK on Fri May 04, 2012 3:00 am

    Warning! Still in progress!
    Well, i thought i should create a thread of handy snippets and tutorials and links.
    so here it is!

    Splitting a string or text into two parts.
    Code:
    dim mainvar as string = "word abc"
    Dim var1 as string = mainvar.substring(o,mainvar.indexof(" "))
    dim var2 as string = mainvar.substring(mainvar.indexof(" ") 1)
    the output for this would be: var1= "word' var2="abc"


    Want to request a snippet/code? pm me and i'll find it!
    avatar
    rlenskens
    Trusted Member
    Trusted Member

    Posts : 142
    Reputation : 3
    Join date : 2012-01-26
    Age : 20
    Location : The Netherlands

    Re: Snippet Bank.

    Post by rlenskens on Fri May 04, 2012 5:56 am

    Well, I am learning c++ kinda (as u know). I use Microsoft visual C++ express. And in some snippets there is like #include "windows.h" But everytime I copy that and then try to run it (ctrl f5) it gives an error that it doesnt have like that header fil or something IDK. How to download or IDK get those?
    BTW: do I always have to include "stdafx.h" ?

    J4cK
    Global Moderator

    Posts : 151
    Reputation : 14
    Join date : 2011-12-19
    Age : 19
    Location : Australia (The land of Beaches, BBQS and Boobs)

    Re: Snippet Bank.

    Post by J4cK on Fri May 04, 2012 7:09 am

    lol dude, i have no idea what your talking about. i use c++ sometimes but i never get those errors, and post them in the c++ section!


    _________________
    Releases

    Injectors: J6JecT

    Game Hacks

    AssaultCube:Cube Hack V0.4 , Epic Recoil
    avatar
    rlenskens
    Trusted Member
    Trusted Member

    Posts : 142
    Reputation : 3
    Join date : 2012-01-26
    Age : 20
    Location : The Netherlands

    Re: Snippet Bank.

    Post by rlenskens on Fri May 04, 2012 10:26 am

    J4cK wrote:lol dude, i have no idea what your talking about. i use c++ sometimes but i never get those errors, and post them in the c++ section!

    sorry... But i am just learning... for like 2 days
    avatar
    IbrahimAyad
    Global Moderator

    Posts : 11
    Reputation : 0
    Join date : 2011-12-21
    Age : 23

    Re: Snippet Bank.

    Post by IbrahimAyad on Fri May 04, 2012 5:41 pm

    rlenskens wrote:Well, I am learning c++ kinda (as u know). I use Microsoft visual C++ express. And in some snippets there is like #include "windows.h" But everytime I copy that and then try to run it (ctrl f5) it gives an error that it doesnt have like that header fil or something IDK. How to download or IDK get those?
    BTW: do I always have to include "stdafx.h" ?

    From what I know, you probably need to.
    avatar
    rlenskens
    Trusted Member
    Trusted Member

    Posts : 142
    Reputation : 3
    Join date : 2012-01-26
    Age : 20
    Location : The Netherlands

    Re: Snippet Bank.

    Post by rlenskens on Sat May 05, 2012 5:26 am

    IbrahimAyad wrote:
    rlenskens wrote:Well, I am learning c++ kinda (as u know). I use Microsoft visual C++ express. And in some snippets there is like #include "windows.h" But everytime I copy that and then try to run it (ctrl f5) it gives an error that it doesnt have like that header fil or something IDK. How to download or IDK get those?
    BTW: do I always have to include "stdafx.h" ?

    From what I know, you probably need to.

    okay, also thought so.
    BTW: U're also learning via www.learningcpp.com he? what chapter r u now?
    avatar
    Geo_Andy
    Runescape Coder

    Posts : 46
    Reputation : 6
    Join date : 2012-04-21
    Location : Pumopolis

    Re: Snippet Bank.

    Post by Geo_Andy on Sat May 05, 2012 1:03 pm

    Does the snippet thing appear invisible until highlighted to anyone else? Or is that just me?


    _________________
    I program, therefore I am.
    avatar
    rlenskens
    Trusted Member
    Trusted Member

    Posts : 142
    Reputation : 3
    Join date : 2012-01-26
    Age : 20
    Location : The Netherlands

    Re: Snippet Bank.

    Post by rlenskens on Sat May 05, 2012 5:45 pm

    Geo_Andy wrote:Does the snippet thing appear invisible until highlighted to anyone else? Or is that just me?
    Not just u man... Just noticed it now u say so -_-. Thougt there was nothing in there.
    avatar
    [GCFH] geomike
    Admin

    Posts : 68
    Reputation : 3
    Join date : 2012-01-02

    Re: Snippet Bank.

    Post by [GCFH] geomike on Sat May 05, 2012 5:59 pm

    Include your libraries in c++ like this: #include <windows.h>


    Use the <> for the main headers and the "" for your own headers.

    J4cK
    Global Moderator

    Posts : 151
    Reputation : 14
    Join date : 2011-12-19
    Age : 19
    Location : Australia (The land of Beaches, BBQS and Boobs)

    Re: Snippet Bank.

    Post by J4cK on Sat May 05, 2012 6:33 pm

    Uhmm, put this in the c++ thread?


    _________________
    Releases

    Injectors: J6JecT

    Game Hacks

    AssaultCube:Cube Hack V0.4 , Epic Recoil
    avatar
    Geo_Andy
    Runescape Coder

    Posts : 46
    Reputation : 6
    Join date : 2012-04-21
    Location : Pumopolis

    Re: Snippet Bank.

    Post by Geo_Andy on Sat May 05, 2012 7:06 pm

    Oh good call J4ck


    _________________
    I program, therefore I am.

    Sponsored content

    Re: Snippet Bank.

    Post by Sponsored content


      Current date/time is Tue Dec 12, 2017 1:15 am