Yep you understood it correctly.
It will add all the *.c files to your index.
This is the result of executing git add *.c

Videos
Yep you understood it correctly.
It will add all the *.c files to your index.
This is the result of executing git add *.c

git add . stages all modified or untracked files in current directory and all subdirectories.
git add *.c adds all files with .c extension. * is called "a star wildcard" and it matches any characters. Eg. if you wanted to add any files with extension starting with .c, you could achieve it with git add *.c*.
Like all sophisticated and powerful things there is a price to be paid to succeed in C++.
- You have to be incredibly careful with memory management.
- Multi-paradigm capability means you have to be really good at design to avoid making a mess.
- Extreme performance requires careful planning and selection of features used.
- The ability to circumvent most every language policy requires monumental self discipline.
So if you're sloppy with memory, poor at design, don't need fast programs, or have no self discipline, then please don't learn C++. There is always Java or C#.
meta programming? templates?
like with C you get performance, but the code looks horrible. with the high level languages you get nice code but there is less flexibility to make the fastest possible code.
with c++ you can do both? you can freely make anything as fast as it could be made in C, but native object orientation, and templates/operator overloading ect makes it so you can write fairly nice looking code too. indeed, you can make it so it is neat and fast.
I have never really found it more of a pain to write stuff in c++ than in a higher level language. the trick is having good libraries.
Hi, so I'm a new C user and I found this code online that prints how many times each character in a string is used. So if the input is hello, it prints
'h' = 1
'e' = 1
'l' = 2
'o' = 1
but what if I want to store each of those words and the times it has been used in a list? So in python I know I can use a for loop and append each string, but how would I do that in C? So like, if the input is "hello", I want to create two lists, list 1 = ['h','e','l','o'] and list 2 would be the amount of times it has been used so list 2 = [1,1,2,1] so integers.
#include <stdio.h>
#include <string.h>
int main()
{
char s[1000];
int i,j,k,count=0,n;
printf("Enter the string : ");
scanf("%s", s);
for(j=0;s[j];j++);
n=j;
printf(" frequency count character in string:\n");
for(i=0;i<n;i++)
{
count=1;
if(s[i])
{
for(j=i+1;j<n;j++)
{
if(s[i]==s[j])
{
count++;
s[j]='\0';
}
}
printf(" '%c' = %d \n",s[i],count);
}
}
return 0;
}