my question is pretty simple: if i have a main.c file:
#include <stdio.h>
#include <string.h>
#include "settings.h"
int main(int argc, char * agrv[])
{
printf("Homepage");
char choice[3];
fgets(choice, sizeof(choice), stdin);
if (strcmp(choice, "1") == 0)
{
openSettings();
}
}
and a settings.h file:
void openSettings();
with settings.c file:
#include <stdio.h>
#include <string.h>
#include "settings.h"
void openSettings()
{
printf("Settings");
char choice[3];
fgets(choice, sizeof(choice), stdin);
if (strcmp(choice, "1") == 0)
{
printf("something");
}
else if (strcmp(choice, "1") == 0)
{
//return to main function (the homepage)
}
}
how can i return to main function in manìin.c from settings.c?