Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
0 registered members (), 635 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Struct - char / String - Anzeige [Re: DavidLancaster] #223870
08/27/08 00:34
08/27/08 00:34
Joined: May 2008
Posts: 123
B
BES Offline
Member
BES  Offline
Member
B

Joined: May 2008
Posts: 123
Just in case you don't get my skype =)
(forgive the undescriptive identifier names)

Quote:
///////////////////////////////
#define PRAGMA_PATH "%EXE_DIR%\templates\images";
#define PRAGMA_PATH "%EXE_DIR%\templates\models";
#define PRAGMA_PATH "%EXE_DIR%\templates\sounds";

#include <acknex.h>
#include <default.c>
#include <stdio.h>

#include "mtlFX.c"
///////////////////////////////

typedef struct BAH {
char charArray[10];
} BAH;

function main()
{
level_load("string_tests.wmb");
wait(2);
printf("Press [0] to move the camera!");

BAH testBah;
diag("\nGAA");
diag_var( "\nsize: %.1f", sizeof( testBah ));


strcpy( testBah.charArray, "Jello?");
diag("\n");
diag( testBah.charArray );
STRING* blech = "mmmhmmm";
diag("\n");
strcpy( testBah.charArray, _chr(blech) );
diag( testBah.charArray );

}


strcpy is part of stdio, and looks like it allows us to have our static size char arrays in our structs while easily being able to interface with other char*s and STRING*s.

Re: Struct - char / String - Anzeige [Re: BES] #223884
08/27/08 02:10
08/27/08 02:10
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline
User
DavidLancaster  Offline
User

Joined: Nov 2004
Posts: 862
Australia
I got it working. Thank you very much!

Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1