Staredit Network > Forums > Technology & Computers > Topic: C pointer help...
C pointer help...
Feb 15 2009, 7:39 pm
By: Forsaken Archer  

Feb 15 2009, 7:39 pm Forsaken Archer Post #1



Code
#include "libmpq/mpq.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

int main(int argc, char **argv)
{
    int arg;
    mpq_archive_s *a;
    printf("wtf\n");
    libmpq__archive_open(&a, argv[1], -1);
    libmpq__archive_files(a, WTF.GOES.HERE);
    printf("total: %d \n", AND.HERE);
   
    libmpq__archive_close(a);
    return 0;
}


Code
int32_t libmpq__archive_files(mpq_archive_s *mpq_archive, uint32_t *files)
{
    CHECK_IS_INITIALIZED();
    /* return archive version. */
    *files = mpq_archive->files;
    /* if no error was found, return zero. */
    return LIBMPQ_SUCCESS;
}




None.

Feb 15 2009, 7:45 pm Doodle77 Post #2



Code
   int arg; int numfiles;
   mpq_archive_s *a;
   printf("wtf\n");
   libmpq__archive_open(&a, argv[1], -1);
   libmpq__archive_files(a, &numfiles);
   printf("total: %d \n", numfiles);

Oh, I forgot to open pidgin, that's why you didn't just ask me on aim :P



None.

Feb 16 2009, 12:35 am Falkoner Post #3



What's the problem you're having? The code looks fine.



None.

Feb 16 2009, 1:13 am O)FaRTy1billion[MM] Post #4

👻 👾 👽 💪

He was wondering what one of the args in the function was.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Feb 16 2009, 7:15 pm Kellimus Post #5



Quote from Falkoner
What's the problem you're having? The code looks fine.

Ummmmmm.....

Quote
libmpq__archive_files(a, WTF.GOES.HERE);
printf("total: %d \n", AND.HERE);

Since when did constant arguments in C become "WTF.GOES.HERE" and "AND.HERE"????

Lol.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-8-06. : 2:41 am]
Oh_Man -- i used to play TF2 competitive in that clan, and also was PR manager (ie: i wrote all the website posts)
[2026-8-06. : 2:41 am]
Oh_Man -- another fun fact iaguz actually joined the clan i was part of - Frenetic Array
[2026-8-06. : 2:40 am]
Symmetry -- Human memory is a fragile, fallible thing
[2026-8-06. : 2:39 am]
Oh_Man -- i realised all his shit was halluc and i wiped out his measly army of fake hallucs and he called GG - yeah thts wat actually happened damn false memory strikes again
[2026-8-06. : 2:38 am]
Oh_Man -- i was zerg, the toss guy did a bunch of hallucinates, and i was like, welp, i guess i'm dead, but i have that mindset of never giving up, so attacked him anyway, then tht was wen
[2026-8-06. : 2:38 am]
Oh_Man -- coz i was actually a zerg main, so wat ACTUALLY happened was a complete reverse of this
[2026-8-06. : 2:37 am]
Oh_Man -- i found an old comment of mine i actually think the idra thing over-ride my own memory
[2026-8-06. : 2:22 am]
Symmetry -- was it idra
[2026-8-06. : 1:52 am]
NudeRaider -- Oh_Man
Oh_Man shouted: and i went on to win the tournament, and a pair of steelseries headphones. i even reember how i won the final match - hallucinated a fck-tonne of units and my opponent thought i had way more than he did and GGed
classic
[2026-8-05. : 2:56 pm]
Oh_Man -- long story short - patience is a virtue!
Please log in to shout.


Members Online: Symmetry