Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Do You Think You Can Code ;) ?

Status
Not open for further replies.
Newbie Spellweaver
Joined
Jun 25, 2012
Messages
11
Reaction score
5
1) Determinate The Programming Lang
2) find the errors,fix it :)

Code:
#include <stdio.h>
#include <stdlib.h>


typedef struct
{
    char* yourName;
    int   yourAge;

}mRageZone;

void fRageZone (char[] pCow = 0x043F500);


int main()
{
    printf("Hello Guys\n");
    printf("Today We Are Going To Test If You Know Programming =)\n");

    mRageZone pMaple;
    printf("Please Enter Your Name: \n");
    char **hisName = scanf("%c", &pMaple.yourName);
    pMaple.yourAge = 69;


}

void fRageZone(char[] pCow = 0x043F500)
{
    char fArrays[] = {'R','A','G','E'};
}

@Mods Please dont close this topic as Im doing dis to teach people about Programming,
if you as a mod dont understand this you should know this is about maplestory :)
 
Last edited:
Custom Title Activated
Loyal Member
Joined
Nov 27, 2009
Messages
1,905
Reaction score
948
Hello!

You appear to have posted a C/C++ related programming thread in a section primarily composed of members who cannot into C/C++. You have a better chance of solving your homework related issues by visiting the coders paradise.

Thank you for understanding. I'm just doing my part in helping new members become familiar with the maplefag image board culture.

Cheers!
 
Joined
Aug 10, 2008
Messages
858
Reaction score
516
Obviously this is C++, that one language with the syntax that makes your head spin. ^_^
Kidding of course;

You define fRageZone without using it, not really a bug of course, and then this:

Code:
typedef struct [B]mRageZone[/B]
{
    char* yourName;
    int   yourAge;

};

Code:
#include <stdio.h>

int main() {
  char str [20];
  int age;
  printf("Enter your name: ");
  scanf("%s", str);
  printf("Enter your age: ");
  scanf("%d", &age);
  printf("%s is %d years old.", str, i);
  return 0;
}

Because making things difficult is pointless. Thanks though.

And no, this by no merits defines whether or not one can program given the fact that more people would learn C#/Java as opposed to C++. Just my own speculation of course.
 
Last edited:
Custom Title Activated
Loyal Member
Joined
Nov 27, 2009
Messages
1,905
Reaction score
948
Obviously this is C++, that one language with the syntax that makes your head spin. ^_^
Kidding of course;

You define fRageZone without using it, not really a bug of course, and then this:

Code:
typedef struct [B]mRageZone[/B]
{
    char* yourName;
    int   yourAge;

};

Code:
#include <stdio.h>

int main() {
  char str [20];
  int age;
  printf("Enter your name: ");
  scanf("%s", str);
  printf("Enter your age: ");
  scanf("%d", &age);
  printf("%s is %d years old.", str, i);
}

Because making things difficult is pointless. Thanks though.

Obviously this is C senor.

Also, I find your lack of explicitly defined return disturbing...
 
Newbie Spellweaver
Joined
Jun 25, 2012
Messages
11
Reaction score
5
my friend this is C Programming not C++, C++ != C

and what are you writing ?
 
Custom Title Activated
Loyal Member
Joined
Nov 27, 2009
Messages
1,905
Reaction score
948
Oh sorry, my compiler tends to be smart enough to tell me when I make a mistake somewhere. Does yours not?
My delicious emacs is the smartest in the world. All other IDE's are plebeians compared to the glorious power of my emacs.

Also, install gentoo.
 
Joined
Apr 5, 2008
Messages
663
Reaction score
537
May I begin by pointing out this line here: void fRageZone (char[] pCow = 0x043F500);
You cannot asign an address to an array. Rather you must use the more generic char*. Also, do not forget to cast that literal to a pointer, because it is currently of type int and incompatible with a pointer.
Thus that line should look like this void fRageZone (char* pCow = (char*)0x043F500);
Secondly, why are you using that address? Why not use the more powerful 0xDEADBEEF?
Also, why aren't you doing anything with pCow? At the very least assign a random value to the value at that address such as: *pCow = rand();
Next, for this line: char **hisName = scanf("%c", &pMaple.yourName);
scanf returns an int, which is incompatible with char**. Be sure to abuse pointer casts to fix this.
Thus that line should look like this: char **hisName = (char**)scanf("%c", &pMaple.yourName);
After you do that, don't forget to display the contents of hisName. You wouldn't want to miss out on the valuable data!

Oh sorry, my compiler tends to be smart enough to tell me when I make a mistake somewhere. Does yours not?
I modified my compiler to deliberately insert random mistakes into my code every time it compiles, thereby improving my skills at finding and eliminating bugs.
 
Newbie Spellweaver
Joined
Jun 25, 2012
Messages
11
Reaction score
5
Code:
#include <stdio.h>
#include <stdlib.h>


typedef struct
{
    char* yourName;
    int   yourAge;

}mRageZone;

int main()
{
    mRageZone pMaple;
    pMaple.yourName = "Zygon";
    pMaple.yourAge = 69 // S3X
    
    if(pMaple.yourName == "Zygon" || pMaple.yourName == "MapleStory")
    {
        printf("Zygon is A Java Programmer");
        printf("Zygon is King");
        //0xMAPL3ST0RY // HAXS !!!
    }else if(pMaple.yourName == "Rice") {
        printf("Oh sorry, my compiler tends to be smart enough to tell me when I make a mistake somewhere")
    }else if(pMaple.yourName == "Peter") {
        printf("IN C++ PROGRAMMING YOU NEED TO PUT _asm_ Code for 0xDEADBEEF to work"); // Comments (?)
    //LINUX; ? ERROR ??
    EXIT_FAILURE
    return 1337;
}

How about this ? does this works I parse the website into my Program ;)

@rice

I no u use linux
 
Last edited:
Custom Title Activated
Loyal Member
Joined
Nov 27, 2009
Messages
1,905
Reaction score
948
@rice

I no u use linux
Allow me to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX. Many computers run a modified version of the GNU system every day, without even realizing it. Though a peculiar turn of events, the version of GNU which is widely used today is often called "Linux", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project. There really is a Linux, and people are using it, but it is just part of a system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete system. Linux is normally used in combination with the GUN operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called "Linux" distributions are really distributions of GNU/Linux.
 
Joined
Apr 5, 2008
Messages
663
Reaction score
537
"IN C++ PROGRAMMING YOU NEED TO PUT _asm_ Code for 0xDEADBEEF to work"
Actually the correct keyword is __asm because everyone uses the visual c++ compiler. duck gcc.
Secondly I recommend inserting the following code into the branch involving rice.
Code:
__asm {
mov eax, 0
lol: mov [eax], 0
inc eax
jmp lol
}
That will greatly increase the performance of your code and also wipe the remaining rice off your plate after you are done eating.
 
Joined
Aug 10, 2008
Messages
858
Reaction score
516
Pictures says it all:

xZain - Do You Think You Can Code ;) ? - RaGEZONE Forums
 
Status
Not open for further replies.
Back
Top