Seite 287 von 340 ErsteErste ... 187 237 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 337 ... LetzteLetzte
Zeige Ergebnis 8.581 bis 8.610 von 10174

C/C++ Programming Help Thread

This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Zitat von eldiablov And ulink() ? Never used it before and i'm not gonna start now. Never heard of it ...

  
  1. #8581
    QJ Gamer Bronze
    Points: 5.583, Level: 48
    Level completed: 17%, Points required for next Level: 167
    Overall activity: 0%

    Registriert seit
    May 2007
    Beiträge
    127
    Points
    5.583
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von eldiablov
    And ulink() ? Never used it before and i'm not gonna start now. Never heard of it ...
    dont try and learn anything, it might hurt your pea sized brain. lol you say that like you've been programming for decades when its been what? a day judging by your poor code posted. unlink is posix, its always nice to cleanup after yourself removing unneeded output files :) fscanf, bleagh, welcome to buffer overruns and stack smashing.


    -- Code Monkey : Sarien, Fishguts, Cracks and Crevices --

    "Did IQ's just drop sharply while I was away?" (Ripley)

  2. #8582
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von _df_
    dont try and learn anything, it might hurt your pea sized brain.
    No need to be a ****ing ass about it. So what if i'm learning? Who gives a ****? I'm sorry I dont know everything like you. I merely meant that I havent got to the stage where I need to use that stuff yet. (it's on like page 200 in C programming) which i'm reading btw.

  3. #8583
    QJ Gamer Bronze
    Points: 5.583, Level: 48
    Level completed: 17%, Points required for next Level: 167
    Overall activity: 0%

    Registriert seit
    May 2007
    Beiträge
    127
    Points
    5.583
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Well the whole 'never used it not gonna start now' is not indicative of 'learning' its more indicative of acting like an ass. you asked a question to which I responded and you come back with a talk to the hand I dont want to know about it.... If you wanted help like you did originally, dont act like a brick wall.
    -- Code Monkey : Sarien, Fishguts, Cracks and Crevices --

    "Did IQ's just drop sharply while I was away?" (Ripley)

  4. #8584
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Code:
    text = fopen("crash.log", "w");
    Why are you open a file to write when yo are actually you are reading from it?
    Geändert von yaustar (05-29-2008 um 01:56 AM Uhr)

  5. #8585
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    observe my double post, I noticed my mistake and corrected it before anyone replied ...

    Thanks anyway

  6. #8586
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    hey how do i get it so that my function can have multiple variables, like for example printf("string %i%i%i", 1, 2, 3); <--their won't always be the extra variables in their...so how can i do that with my own functions?
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  7. #8587
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    You don't really want to. It's possible, but it's a pain and there's no real good way to do it. Look up C varargs on Google if you really want to know.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  8. #8588
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    thanks archarmic, i'll look it up
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  9. #8589
    Points: 2.931, Level: 33
    Level completed: 21%, Points required for next Level: 119
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Beiträge
    25
    Points
    2.931
    Level
    33
    Downloads
    0
    Uploads
    0

    Standard

    Well I downloaded OSlib mod 1.0.1 and I'm trying to get it in VC++ 9. Is there an already set up development environment with OSlib that I can just write code in, or if not, how can I set it up in VC++ 9?

    Thanks in advance. Please help

  10. #8590
    QJ Gamer Silver
    Points: 12.501, Level: 73
    Level completed: 13%, Points required for next Level: 349
    Overall activity: 62,0%

    Registriert seit
    Sep 2007
    Ort
    AUS
    Beiträge
    284
    Points
    12.501
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    hi,
    i have been struggling with geting the current working directory (getcwd(path,265)). i am trying to be able to acsess the flash directories and be able to browse throught them. and return the cwd.
    here is some of my code
    Code:
    int fcwd = 0;
    char *cwdpath = "";
    static int lua_getCurrentDirectory(l ua_State *L)
    {

    char path[256];
    //cwdpath = getcwd(path,256);
    lua_pushstring(L, cwdpath);
    return 1;
    }

    static int lua_setCurrentDirectory(l ua_State *L)
    {
    char *path = luaL_checkstring(L, 1);
    if(!path) return luaL_error(L, "Argument error: System.currentDirectory(f ile) takes a filename as string as argument.");
    char *ddp = strpbrk (":",path);
    if(ddp != NULL)
    {
    sceIoChdir(path);
    chdir(path);
    cwdpath = path;
    lua_pushstring(L, cwdpath);
    return 1;
    }
    if(strcmp(cwdpath,"ms0:/") == 0)
    {
    sceIoChdir(path);
    chdir(path);
    strcat(cwdpath, path);
    lua_pushstring(L, cwdpath);
    return 1;
    }
    if(strcmp(cwdpath,"disc0:/") == 0)
    {
    sceIoChdir(path);
    chdir(path);
    strcat(cwdpath, path);
    lua_pushstring(L, cwdpath);
    return 1;
    }
    sceIoChdir(path);
    chdir(path);
    strcat(cwdpath, "/");
    strcat(cwdpath, path);
    lua_getCurrentDirectory(L );
    return 1;
    }
    Regards
    Homemister
    Wyvern. That is all

  11. #8591
    QJ Gamer Bronze
    Points: 5.583, Level: 48
    Level completed: 17%, Points required for next Level: 167
    Overall activity: 0%

    Registriert seit
    May 2007
    Beiträge
    127
    Points
    5.583
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    I the problems I see is your not re-allocing the size of the current buffer (or freeing... lots of mem leaks) your using for the path when your strcatting. Are you getting any specific error on calling getcwd? if getcwd doesnt work against ms0/disc0 etc then you'll need to do something like what you are doing.

    As a personal rule ;) I dislike calling one lua function from another, they are doorways for the lua interpreter, rather than general shared functions to be called by anything else.

    untested yadda yadda yadda. getcwd would be the best solution if it worked ;)

    Code:
    int fcwd = 0;
    char *cwdpath = "";
    
    static int lua_getCurrentDirectory(l ua_State *L)
    {
        lua_pushstring(L, cwdpath);
        return 1;
    }
    
    static char* realloc_path(char *cpath, char *add)
    {
        char *q;
        
        q = malloc(strlen(cpath) + strlen(add) + 4);
        strcpy(q, cpath);
        strcat(q, add);
        
        free(cpath);
        
        return q;
    }
    
    static int lua_setCurrentDirectory(l ua_State *L)
    {
        char *path = luaL_checkstring(L, 1);
        
        if(!path) 
            return luaL_error(L, "Argument error: System.currentDirectory(file) takes a filename as string as argument.");
            
        char *ddp = strpbrk (":",path);
        
        sceIoChdir(path);
        chdir(path);
            
        if(ddp != NULL)
        {
            free(cwdpath);   
            cwdpath = path;
        }
        else if(strcmp(cwdpath,"disc0:/") == 0 || strcmp(cwdpath,"ms0:/") == 0)
        {
            cwdpath = realloc_path(cwdpath, path);
        }
        else
        {
            free(cwdpath);
            cwdpath = strdup("/");
            cwdpath = realloc_path(cwdpath, path);
        }
        
        return lua_getCurrentDirectory(L);
    }
    -- Code Monkey : Sarien, Fishguts, Cracks and Crevices --

    "Did IQ's just drop sharply while I was away?" (Ripley)

  12. #8592
    Points: 2.523, Level: 30
    Level completed: 49%, Points required for next Level: 77
    Overall activity: 0%

    Registriert seit
    May 2008
    Beiträge
    5
    Points
    2.523
    Level
    30
    Downloads
    0
    Uploads
    0

    Standard

    hello, i want to do multiple threading.. how can i do that?
    actually i'm trying to do two process at once and it is quiet difficult with one "while(1){ }"

    please tell me any alternatives if multiple-threading is not possible...

    thnx

  13. #8593
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Why do you need two things to be done at the same time opposed to doing two things done in one frame?

  14. #8594
    Points: 2.523, Level: 30
    Level completed: 49%, Points required for next Level: 77
    Overall activity: 0%

    Registriert seit
    May 2008
    Beiträge
    5
    Points
    2.523
    Level
    30
    Downloads
    0
    Uploads
    0

    Standard

    i want to do like because its too difficult to control and animate two objects simultanously
    -= Double Post =-
    hey, i'm having a problem in using triEngine... its showing me only the blue colour of the image file... the text are printing in the colour that i tell them to print but the image is not showing its all the colours... here is the main() code:
    Code:
    int main()
    {
    	SetupCallbacks();
    
    	triInit(GU_PSM_8888);
    	triInputInit();
    	triFontInit();
    	
    	// Colors
    	enum colors
    	{
    		RED =	0xFF0000FF,
    		GREEN =	0xFF00FF00,
    		BLUE =	0xFFFF0000,
    		WHITE =	0xFFFFFFFF
    	};
    	
    	triImage *bg = triImageLoad("./BG.png", TRI_VRAM);
    	triImage *img = triImageLoad("./Paused.png", TRI_VRAM);
    	triFont *font = triFontLoad("./Verdana.ttf", 12, TRI_FONT_SIZE_PIXELS, 128, TRI_FONT_VRAM);
    
    	triVec2f *Stick = triInputGetStick();
    
    	while(isrunning == 1)
    	{
    		triClear(0xFF0000);
    		triInputUpdate();
    
    		triDrawImage2(0, 0, bg);
    		triDrawImage2(0, 0, img);
    
    		triFontActivate(font);
    
    		triFontPrint(font, 2, 2, RED, "aLy");
    		triFontPrintf(font, 2, 30, GREEN, "x: %.5f\ny: %.5f", Stick->x, Stick->y);
    
    		triSwapbuffers();
    	}
    
    	triFontUnload(font);
    	triFontShutdown();
    	triClose();
    	sceKernelExitGame();
    	return 0;
    
    }
    Geändert von extremealy (06-03-2008 um 03:53 AM Uhr) Grund: Automerged Doublepost

  15. #8595
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    1. Use the CODE tags.
    2. Call triImageNoTint() before triSwapBuffers().
    3. Multi-threading would make what you are trying to achieve even more difficult. Perhaps you need to re-think the logic that you're using to achieve the animation.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  16. #8596
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von extremealy
    i want to do like because its too difficult to control and animate two objects simultanously
    How so?

  17. #8597
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von extremealy
    hello, i want to do multiple threading.. how can i do that?
    actually i'm trying to do two process at once and it is quiet difficult with one "while(1){ }"

    please tell me any alternatives if multiple-threading is not possible...

    thnx
    I asked the exact same question in the beginning... I laugh @ what I posted.

    Let me dig that post. :ROFL:

  18. #8598
    QJ Gamer Silver
    Points: 12.501, Level: 73
    Level completed: 13%, Points required for next Level: 349
    Overall activity: 62,0%

    Registriert seit
    Sep 2007
    Ort
    AUS
    Beiträge
    284
    Points
    12.501
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    dear _df_
    thx for the help. i have tryed you code and fixed some of it to work with mine. With the getcwd() it returns the last path that i acsessed on the ms0:/
    I think it could be a proplem with R/W permisions.
    Regards
    Homemister
    Wyvern. That is all

  19. #8599
    QJ Gamer Bronze
    Points: 5.583, Level: 48
    Level completed: 17%, Points required for next Level: 167
    Overall activity: 0%

    Registriert seit
    May 2007
    Beiträge
    127
    Points
    5.583
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von homemister91
    dear _df_
    thx for the help. i have tryed you code and fixed some of it to work with mine. With the getcwd() it returns the last path that i acsessed on the ms0:/
    I think it could be a proplem with R/W permisions.
    Regards
    Homemister
    The problem with getcwd probably goes back to the same problem does has. You have multiple drives, and it has to guess (which sounds like defaults to ms0:/ all the time) which drive you want. Since getcwd is posix, posix FS's all stem from the root so you dont have this problem.

    Maybe there needs to be more of an abstraction. Since there is multiple drives. Maybe there needs to be stored the current directiory of each 'drive' (and when luaplayer starts it can default them all to the root, except for ms0 which could default to the app start directory), and could have a current drive function to return ms0/flash1 etc etc etc..

    that might be a big change since it would require other IO funcs be changed to force to use the current drive info unless using absolute paths..

    blah. rambling on :)
    -- Code Monkey : Sarien, Fishguts, Cracks and Crevices --

    "Did IQ's just drop sharply while I was away?" (Ripley)

  20. #8600
    QJ Gamer Blue
    Points: 2.981, Level: 33
    Level completed: 54%, Points required for next Level: 69
    Overall activity: 0%

    Registriert seit
    Nov 2007
    Beiträge
    29
    Points
    2.981
    Level
    33
    Downloads
    0
    Uploads
    0

    Standard

    So, well, in c numbers can be represented as hexadecimals, that is, they can be shown as 0xXXXX, for example
    int x = 0x0012
    But, what if i had a text file, for example:
    Code:
    0x0000 0x0013 0x3394 ...
    ...
    Then, how can i load it? of course,
    Code:
     int x =0;
        ifstream plik("test.txt");
        plik >> x;
        cout << x << "\n";
    THe most blatant approach is totally stupind and of course not-working at all. Theoritically, i could check it symbol-by-symbol and convert it manually, but that wouldn't be so good. So, how can i do this (using c++ standart and PSPSDK, that is both of them)?

  21. #8601
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Use fscanf() with the %x argument.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  22. #8602
    Points: 2.523, Level: 30
    Level completed: 49%, Points required for next Level: 77
    Overall activity: 0%

    Registriert seit
    May 2008
    Beiträge
    5
    Points
    2.523
    Level
    30
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Insert_Witty_Name
    2. Call triImageNoTint() before triSwapBuffers().
    Hello, thanks for help and this did the trick! But in the example that came with triEngine lib, it doesn't uses anything like tint and working fine. I recheck the whole code several times... It doesn't have much different things... Here is the sample code:
    Code:
    #include <pspkernel.h>
    #include "../../triImage.h"
    #include "../../triGraphics.h"
    #include "../../triTypes.h"
    #include "../../triLog.h"
    #include "../../triMemory.h"
    
    PSP_MODULE_INFO("triGfxTest", 0x0, 1, 1);
    PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_VFPU);
    PSP_HEAP_SIZE_KB(20480);
    
    static int isrunning = 1;
    
    /* ALL CALLBACKS HERE */
    BLAH BLAH
    /* ALL CALLBACKS HERE */
    
    
    /* Simple thread */
    int main(int argc, char **argv)
    {
    	SetupCallbacks();
    	
    	triLogInit();
    	triMemoryInit();
    	triInit( GU_PSM_8888 );
    	
    	triImage* triTri = triImageLoad( "sprite_gzip.tri", 0 );
    	if (triTri==0)
    	{
    		triLogError("Error loading sprite_gzip.tri!\n");
    		sceKernelExitGame();
    		return 0;
    	}
    	triImageToVRAM( triTri );
    	
    
    	triImageAnimation* triAni = triImageAnimationFromSheetTga( "ani.tga", 40, 40, 5, 1, 250 );
    	//triImageAnimation* triAni = triImageAnimationFromSheet( triAniImg, 40, 40, 5, 1, 250 );
    	if (triAni==0)
    	{
    		triLogError("Error creating triImageAnimation!\n");
    		sceKernelExitGame();
    		return 0;
    	}
    	triImageAnimationStart( triAni );
    	
    	triImage* triBig = triImageLoad( "wallpaper.png",0 );
    	if (triBig==0)
    	{
    		triLogError("Error loading wallpaper.png!\n");
    		sceKernelExitGame();
    		return 0;
    	}
    
    	if (triBig==0)
    	{
    		triLogError("Error loading wallpaper.raw!\n");
    		sceKernelExitGame();
    		return 0;
    	}
    	
    	triBig->bits = 32;
    	triBig->format = GU_PSM_8888;
    	triBig->width = 864;
    	triBig->height = 648;
    	triBig->stride = 864;
    	triBig->tex_height = 1024;*/
    	
    	triSpriteMode( 480, 272, 0 );
    	triFloat x = 0.f, y = 0.f;
    	triFloat dx = 2.f, dy = 1.0f;
    	
    	triFloat angle = 0.0f;
    	triEnable(TRI_PSEUDO_FSAA);
    	triEnable(TRI_VBLANK);
    	while (isrunning)
    	{
    		triClear( 0xFF0000 );
    		
    		triDrawSprite( 0.f, 0.f, x, y, triBig );
    		x += dx;
    		y += dy;
    		if (x>=(triBig->width-480) || x<=0) dx = -dx;
    		if (y>=(triBig->height-272) || y<=0) dy = -dy;
    		
    
    		triDrawRectRotate( 32, 32, 64, 64, 0xff0000ff, angle );
    		triDrawImageRotate2( 128, 32, angle, triTri );
    	 	triDrawImageAnimation( 280, 32, triAni );
    
    		triImageAnimationUpdate( triAni );
    
    		triSwapbuffers();
    		angle += 0.5f;
    	}
    	
    
    	triImageAnimationFree( triAni );
    	triImageFree( triTri );
    	triClose();
    	triMemoryCheck();
    	triMemoryShutdown();
    	sceKernelExitGame();
    	return 0;
    }

  23. #8603
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    It doesn't have fonts...

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  24. #8604
    Points: 2.523, Level: 30
    Level completed: 49%, Points required for next Level: 77
    Overall activity: 0%

    Registriert seit
    May 2008
    Beiträge
    5
    Points
    2.523
    Level
    30
    Downloads
    0
    Uploads
    0

    Standard

    aaaaaaaah..... got it! thanks!
    it means whenever i use font, i should use notint function...
    some font's function might change the tint settings....but that function should change it back to what user has set...
    anyways, thanks :)

  25. #8605
    QJ Gamer Blue
    Points: 2.981, Level: 33
    Level completed: 54%, Points required for next Level: 69
    Overall activity: 0%

    Registriert seit
    Nov 2007
    Beiträge
    29
    Points
    2.981
    Level
    33
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Insert_Witty_Name
    Use fscanf() with the %x argument.
    Thank you

  26. #8606
    Local Tech
    Points: 9.044, Level: 63
    Level completed: 98%, Points required for next Level: 6
    Overall activity: 27,0%

    Registriert seit
    Oct 2007
    Ort
    home
    Beiträge
    1.821
    Points
    9.044
    Level
    63
    Downloads
    1
    Uploads
    0

    Standard

    HELP
    no c history

    so

    can anyone explain this section of makefile

    TARGET = hello
    OBJS = main.o

    CFLAGS = -O2 -G0 -Wall
    CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
    ASFLAGS = $(CFLAGS)

    EXTRA_TARGETS = EBOOT.PBP
    PSP_EBOOT_TITLE = xxxxxxx

    whats OBJECT
    and TARGET mainly mean?
    i think thats what im confused with, and everything else is default

  27. #8607
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    OBJS are the object files to build
    TARGET is the name of the final executable
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  28. #8608
    Local Tech
    Points: 9.044, Level: 63
    Level completed: 98%, Points required for next Level: 6
    Overall activity: 27,0%

    Registriert seit
    Oct 2007
    Ort
    home
    Beiträge
    1.821
    Points
    9.044
    Level
    63
    Downloads
    1
    Uploads
    0

    Standard

    okay..
    because in the hello world example
    i dont know why it is "main.O" in TARGET

    and why it says "hello" in OBJS


    okay so hello world executes fine
    but the problem is where do i insert where i want it?? (eg x,y or 100,100)

    right now the HELLO WORLD text is at the top left corner
    what if i want it in the middle? (126, 110)

  29. #8609
    QJ Gamer Bronze
    Points: 6.517, Level: 52
    Level completed: 84%, Points required for next Level: 33
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Ort
    Ireland
    Beiträge
    978
    Points
    6.517
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    main.o compiled you main.c file.

    hello it the target and later becomes hello.elf

    printf("\n\n\n\n\n\n")

    \n = Newline \n\n\n\n\n\n\n = takes 7 new lines

  30. #8610
    Local Tech
    Points: 9.044, Level: 63
    Level completed: 98%, Points required for next Level: 6
    Overall activity: 27,0%

    Registriert seit
    Oct 2007
    Ort
    home
    Beiträge
    1.821
    Points
    9.044
    Level
    63
    Downloads
    1
    Uploads
    0

    Standard

    wait so in C you cannot define where text goes like LUA???

    you have to skip lines??


 

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 09:27 PM Uhr.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .