Menu
Coddy logo textTech

The Class

Lesson 1 of 8 in Coddy's User Class - OOP Project course.

challenge icon

Challenge

Easy

Create a class named User with nothing inside for now.

Try it yourself

#include <stdio.h>
#include <string.h>
#include "user.h"

int main() {
    char line[1024];
    while (fgets(line, sizeof(line), stdin)) {
        line[strcspn(line, "\r\n")] = '\0';
        if (line[0] == '\0') continue;
        if (strcmp(line, "exists") == 0) {
            User u;
            User_init(&u);
            printf("yes\n");
        }
    }
    return 0;
}

All lessons in User Class - OOP Project