Author Topic: c++  (Read 7301 times)

PaulBird

  • Sr. Member
  • ****
  • Posts: 485
  • Reputation: 5
  • Every problem is an opportunity in disguise
    • Google
  • Badges:
Re: c++
« Reply #15 on: August 04, 2011, 09:14:07 pm »
IDK I just include that in all of them just to avoid errors.
ohhh :P hahah well, unless u get errors its good practice not to put it (unless needed of course).

@D3nn: i see..
People Never Get The Flowers While They Can Still Smell Them

C0deH4cker

  • Hero Member
  • *****
  • Posts: 2849
  • Reputation: 129
  • I am leaving iNinjas. Contact me via email.
  • Badges:
  • iDevices: iPhone 4S 16gb Black (5.1.1), iPad 2 32gb White (5.0.1), iPod Touch 2G 8gb (4.2.1)
Re: c++
« Reply #16 on: August 06, 2011, 03:11:51 am »
You dont need <iostream> unless youre using I/O (reading from stdin or writing to stdout/stderr).

#include <cstdlib>
int main() {
    int ret = system("batfile.bat");
    return ret;
}





You know, you can just do this: cmd.exe /c batchfile.bat

PaulBird

  • Sr. Member
  • ****
  • Posts: 485
  • Reputation: 5
  • Every problem is an opportunity in disguise
    • Google
  • Badges:
Re: c++
« Reply #17 on: August 06, 2011, 04:49:42 pm »
idt u need to cstdlib..
People Never Get The Flowers While They Can Still Smell Them

C0deH4cker

  • Hero Member
  • *****
  • Posts: 2849
  • Reputation: 129
  • I am leaving iNinjas. Contact me via email.
  • Badges:
  • iDevices: iPhone 4S 16gb Black (5.1.1), iPad 2 32gb White (5.0.1), iPod Touch 2G 8gb (4.2.1)
Re: c++
« Reply #18 on: August 06, 2011, 08:41:25 pm »
U do because system is a function in the c standard library.

A12danrulz

  • Leader
  • Hero Member
  • *****
  • Posts: 4018
  • Reputation: 216
  • Badges:
Re: c++
« Reply #19 on: August 06, 2011, 08:46:32 pm »
Ok i need a little c++ help. How would you record urls visited BEFORE the page actually loads? Like capture the requests and save them before the page is ever loaded?

Don't like seeing ads? Click here to register!

PaulBird

  • Sr. Member
  • ****
  • Posts: 485
  • Reputation: 5
  • Every problem is an opportunity in disguise
    • Google
  • Badges:
Re: c++
« Reply #20 on: August 06, 2011, 08:50:48 pm »
wow, thats complicated. you'll need to prolly learn sockets + other things to be able to do that :P i think its a very advanced c++ concept
People Never Get The Flowers While They Can Still Smell Them

A12danrulz

  • Leader
  • Hero Member
  • *****
  • Posts: 4018
  • Reputation: 216
  • Badges:
Re: c++
« Reply #21 on: August 06, 2011, 08:53:19 pm »
Ok. It was an idea for a virus I was thinking about writing to make it intercept urls then stop you from accessing it. I just didn't know how to get the requests.

PaulBird

  • Sr. Member
  • ****
  • Posts: 485
  • Reputation: 5
  • Every problem is an opportunity in disguise
    • Google
  • Badges:
Re: c++
« Reply #22 on: August 06, 2011, 08:57:43 pm »
i see. i give you so much respect for thinking about doin this in c++ since many ppl go with easier alternatives to do that (such as python) not that thats bad, but you learn soo many more concepts from doing it in c++.

u shd start with learning c++ socket programming. ill upload a great pdf for that asap if u wish.
People Never Get The Flowers While They Can Still Smell Them

A12danrulz

  • Leader
  • Hero Member
  • *****
  • Posts: 4018
  • Reputation: 216
  • Badges:
Re: c++
« Reply #23 on: August 06, 2011, 09:02:23 pm »
Yes. Can I get the socket library on my iPod? Tried before but some idiot forgot a variable and I didn't feel like hunting through hundreds of lines of code to see how I should declare the variable.

PaulBird

  • Sr. Member
  • ****
  • Posts: 485
  • Reputation: 5
  • Every problem is an opportunity in disguise
    • Google
  • Badges:
Re: c++
« Reply #24 on: August 06, 2011, 09:05:57 pm »
yup:) its already on the ipod.
just do a #include <sys/socket.h>
go to /usr/include/sys , u should have socket.h there. im 100% sure u do though.
and one secc... ima upload tht pdf now.
People Never Get The Flowers While They Can Still Smell Them

Don't like seeing ads? Click here to register!

PaulBird

  • Sr. Member
  • ****
  • Posts: 485
  • Reputation: 5
  • Every problem is an opportunity in disguise
    • Google
  • Badges:
Re: c++
« Reply #25 on: August 06, 2011, 09:08:33 pm »
here ya go. the author is good.
People Never Get The Flowers While They Can Still Smell Them

A12danrulz

  • Leader
  • Hero Member
  • *****
  • Posts: 4018
  • Reputation: 216
  • Badges:
Re: c++
« Reply #26 on: August 06, 2011, 10:08:33 pm »
That's for C not C++. Will it still work? I'm pretty sure it will but just double checking.

PaulBird

  • Sr. Member
  • ****
  • Posts: 485
  • Reputation: 5
  • Every problem is an opportunity in disguise
    • Google
  • Badges:
Re: c++
« Reply #27 on: August 06, 2011, 10:19:23 pm »
oops! sry haha. and yea. you might have to overlook some of the structs and stuff:\ sry haha. but nonetheless it teaches u to get around socket.h and is basically the same as c++ :P

does anyone have any good C++ pdfs on sockets? MUCH appreciated :)
People Never Get The Flowers While They Can Still Smell Them

A12danrulz

  • Leader
  • Hero Member
  • *****
  • Posts: 4018
  • Reputation: 216
  • Badges:
Re: c++
« Reply #28 on: August 06, 2011, 10:26:05 pm »
Lol I do enjoy beejs guides though. I like his sense of humor. He lays it on a little thick sometimes but it keeps it interesting. And I'm pretty sure most of the functions will work and I can probably figure out what needs to be converted to c++ code. However they are both very similar so I shouldn't have too many issues.

PaulBird

  • Sr. Member
  • ****
  • Posts: 485
  • Reputation: 5
  • Every problem is an opportunity in disguise
    • Google
  • Badges:
Re: c++
« Reply #29 on: August 06, 2011, 10:44:35 pm »
exactly haha! sometimes i crack a smile(: hes enjoyable. reminds me of my algabra 1 math teacher so much.

and yup:) i find socket programming very fun. although i do miss doing it in python :( i figured if i wanted to get better at c++ theres no better way than to do everything in it.
People Never Get The Flowers While They Can Still Smell Them