Add the CLion practice projects
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
29f932b82f
20 files changed
+210
No files matched your search
@@ -0,0 +1,3 @@
|
|||||||
|
.DS_Store
|
||||||
|
.idea/
|
||||||
|
cmake-build-*/
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.14)
|
||||||
|
project(Login C)
|
||||||
|
|
||||||
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
|
||||||
|
add_library(Login library.c library.h)
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
#include "library.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
typedef void{
|
||||||
|
short numusu;
|
||||||
|
short *id;
|
||||||
|
char *usuarios;
|
||||||
|
char *contrasinais;
|
||||||
|
short adm;
|
||||||
|
}data;
|
||||||
|
|
||||||
|
typedef data *base;
|
||||||
|
|
||||||
|
|
||||||
|
void setUUID(short lonx, base *datos){
|
||||||
|
short i;
|
||||||
|
(*datos)->id=(short*)malloc(lonx+1*sizeof(short));
|
||||||
|
for(i=0;i<=lonx;i++){
|
||||||
|
*((*datos)->id+i)=i;}
|
||||||
|
(*datos)->numusu=lonx;}
|
||||||
|
|
||||||
|
|
||||||
|
void setusr(char *vector, base *datos){
|
||||||
|
short i,j;
|
||||||
|
printf("%hd\n",(*datos)->numusu);
|
||||||
|
printf("\n");
|
||||||
|
(*datos)->usuarios=(char*)malloc(10*((*datos)->numusu)*sizeof(char));
|
||||||
|
for(i=0;i<((*datos)->numusu);i++){
|
||||||
|
for(j=0;j<10;j++){
|
||||||
|
*((*datos)->usuarios+i*10+j)=*(vector+i*10+j);
|
||||||
|
printf("%c",*((*datos)->usuarios+i*10+j));}}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setpas(char *vecto, base *datos){
|
||||||
|
short i,j;
|
||||||
|
printf("%hd\n",(*datos)->numusu);
|
||||||
|
printf("\n");
|
||||||
|
(*datos)->contrasinais=(char*)malloc(8*((*datos)->numusu)*sizeof(char));
|
||||||
|
for(i=0;i<((*datos)->numusu);i++){
|
||||||
|
for(j=0;j<=8;j++){
|
||||||
|
*((*datos)->contrasinais+i*8+j)=*(vecto+i*8+j);
|
||||||
|
printf("%c",*((*datos)->contrasinais+i*8+j));}}
|
||||||
|
}
|
||||||
|
//void liberar(matrizP *m1) {
|
||||||
|
//if ((*m1)->datos != NULL)
|
||||||
|
//free((*m1)->datos);
|
||||||
|
// if ((*m1) != NULL)
|
||||||
|
// free((*m1));
|
||||||
|
//}
|
||||||
|
|
||||||
|
//void crear(matrizP *m1, short tam1) {
|
||||||
|
//long i;
|
||||||
|
//*m1 = (matrizP) malloc(sizeof (STMATRIZ));
|
||||||
|
//(*m1)->datos = (TELEMENTO*) malloc(tam1 * tam1 * sizeof (TELEMENTO));
|
||||||
|
//(*m1)->tam = tam1;
|
||||||
|
//for (i = 1; i <= tam1 * tam1; i++)
|
||||||
|
//*((*m1)->datos + i - 1) = 0;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//void asignar(matrizP *m1, short fila, short columna, TELEMENTO valor) {
|
||||||
|
// *((*m1)->datos + (fila - 1)*(*m1)->tam + columna - 1) = valor;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//void inicializar(matrizP *m1){
|
||||||
|
// TELEMENTO element;
|
||||||
|
// short i=1, j=1;
|
||||||
|
// printf("%hd", (*m1)->tam);
|
||||||
|
// for(i=1; i<=((*m1)->tam); i++){
|
||||||
|
// for(j=1; j<=((*m1)->tam); j++){
|
||||||
|
// element=10.0*(TELEMENTO)rand()/RAND_MAX;
|
||||||
|
// element=10.0*(TELEMENTO)rand()/RAND_MAX;
|
||||||
|
// *((*m1)->datos + (i - 1)*(*m1)->tam + j - 1) = element;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
//TELEMENTO recuperar(matrizP m1, short fila, short columna){
|
||||||
|
// TELEMENTO valor;
|
||||||
|
// valor=*((m1)->datos + (fila - 1)*(m1)->tam + columna - 1);
|
||||||
|
// return(valor);
|
||||||
|
//}
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#ifndef LOGIN_LIBRARY_H
|
||||||
|
#define LOGIN_LIBRARY_H
|
||||||
|
|
||||||
|
typedef void *data;
|
||||||
|
|
||||||
|
void crear(data *datos);
|
||||||
|
|
||||||
|
void setUUID(short a, data *datos);
|
||||||
|
|
||||||
|
void setusr(char *a, data *datos);
|
||||||
|
|
||||||
|
void setpas(char *a, data *datos);
|
||||||
|
|
||||||
|
#endif //LOGIN_LIBRARY_H
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.14)
|
||||||
|
project(uOMG C)
|
||||||
|
|
||||||
|
set(CMAKE_C_STANDARD 11)
|
||||||
|
|
||||||
|
add_executable(uOMG main.c)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
printf("Hello, World!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.14)
|
||||||
|
project(untitled C)
|
||||||
|
|
||||||
|
set(CMAKE_C_STANDARD 11)
|
||||||
|
|
||||||
|
add_library(untitled library.c library.h)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#include "library.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void hello(void) {
|
||||||
|
printf("Hello, World!\n");
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#ifndef UNTITLED_LIBRARY_H
|
||||||
|
#define UNTITLED_LIBRARY_H
|
||||||
|
|
||||||
|
void hello(void);
|
||||||
|
|
||||||
|
#endif //UNTITLED_LIBRARY_H
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
project(untitled1 C)
|
||||||
|
|
||||||
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
|
||||||
|
add_executable(untitled1 main.c)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
printf("Hello, World!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
project(untitled2 C)
|
||||||
|
|
||||||
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
|
||||||
|
add_library(untitled2 library.c library.h)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#include "library.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void hello(void) {
|
||||||
|
printf("Hello, World!\n");
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#ifndef UNTITLED2_LIBRARY_H
|
||||||
|
#define UNTITLED2_LIBRARY_H
|
||||||
|
|
||||||
|
void hello(void);
|
||||||
|
|
||||||
|
#endif //UNTITLED2_LIBRARY_H
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
project(untitled3 C)
|
||||||
|
|
||||||
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
|
||||||
|
add_library(untitled3 library.c library.h)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#include "library.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void hello(void) {
|
||||||
|
printf("Hello, World!\n");
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#ifndef UNTITLED3_LIBRARY_H
|
||||||
|
#define UNTITLED3_LIBRARY_H
|
||||||
|
|
||||||
|
void hello(void);
|
||||||
|
|
||||||
|
#endif //UNTITLED3_LIBRARY_H
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
project(untitled4 C)
|
||||||
|
|
||||||
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
|
||||||
|
add_library(untitled4 library.c library.h)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#include "library.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void hello(void) {
|
||||||
|
printf("Hello, World!\n");
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#ifndef UNTITLED4_LIBRARY_H
|
||||||
|
#define UNTITLED4_LIBRARY_H
|
||||||
|
|
||||||
|
void hello(void);
|
||||||
|
|
||||||
|
#endif //UNTITLED4_LIBRARY_H
|
||||||
Reference in new issue
Block a user