Why isn't 3ds-curl not working?
How to get content of webpage
How do I do this? I know the buffer in https://github.com/devkitPro/3ds-exampl ... twork/http has the content, but how do I convert it to char* or anything else that can be printed on screen?
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: How to get content of webpage
Firstly welcome to the forum & thanks for signing up and asking your question here.
You mentioned on the libcrtu issue that you're fairly new to C so I'm going to suggest that you do some reading. The online guide that's most recommended is Beej's Guide to C Programming although personally I prefer physical books for reference material.
To answer your question more directly though, converting the u8 buffer is really just as simple as casting to a char * i.e.
If you're looking at parsing lines from this buffer (if for instance it's an html page) then you might want to look into fmemopen & fgets. It's difficult to offer concrete advice without more detail on what it is you wnat to achieve though.
You mentioned on the libcrtu issue that you're fairly new to C so I'm going to suggest that you do some reading. The online guide that's most recommended is Beej's Guide to C Programming although personally I prefer physical books for reference material.
To answer your question more directly though, converting the u8 buffer is really just as simple as casting to a char * i.e.
Code: Select all
char *mycharbuf = (char*) buf
Re: How to get content of webpage
It doesn't really work for me, it runs fine, but it won't print the content on the screen. Also didn't work so I changed it to but that shouldn't change it, right?
Code: Select all
char *mycharbuf = (char* buf)
Code: Select all
char *mycharbuf = (char*) buf
- Attachments
-
- ROMFree3DS.zip
- The source code
- (188.41 KiB) Downloaded 540 times
-
- Capture.PNG
- What I see
- (35.91 KiB) Not downloaded yet
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Why isn't 3ds-curl not working?
Sorry. We don't support piracy.
Who is online
Users browsing this forum: No registered users and 0 guests