« first day (2192 days earlier)      last day (236 days later) » 

7:37 PM
char * nome = malloc(256);
char * cc = malloc(256);
char * morada = malloc(256);
char * tlf = malloc(20);
printf("Novo nome:");
fflush(stdin);
scanf("%s", nome);
printf("Nova Morada:");
fflush(stdin);
scanf("%s",morada);
printf("Cartao de cidadao:");
fflush(stdin);
scanf("%s", cc);
printf("Novo Contacto:");
fflush(stdin);
scanf("%s", tlf);
system("cls");
goodnight
 
Xeo
2 messages moved from Lounge<C++>
 
 
3 hours later…
10:51 PM
Hey guys, I'm new to C++, and most of what I know has been taught by my school.
 
user1804599
@sweg_yolo_69 Forget all that, schools are terrible at teaching C++.
 
However, when reading on the Internet, I came across some facts that go against what my teachers have said.
I'm talking about really basic stuff here, I'll post a couple of exmaples
So, this is an ideal version of a program that takes 2 numbers and prints their sum
#include <iostream>

using namespace std;

int main()

{

int a, b;

cin >> a >> b;

cout << a+b << endl;

return 0;

}
 
6 messages moved from Lounge<C++>
 
user1804599
11:16 PM
 
1 message moved from Lounge<C++>
 

« first day (2192 days earlier)      last day (236 days later) »