Nomid Íkorni-Sciurus
try emacs
Already tried. I got used to its commands and actually I find it to be decent. Has a nice Makefile and gdb/lldb integration.
But it won't work well for large projects.
Vladimir
>is not an IDE
It can be
Nomid Íkorni-Sciurus
I know what it can do, and I know it can do it a bit limited.
C/C++ requires tags regeneration and it's tedious when you're editing like whole files all the way and you'd be like rtags every 5 seconds.
Vladimir
Agree, tags stuff is an itchy part...
Vladimir
I decided to just not use them
Nomid Íkorni-Sciurus
There is actually a language server that does not use tags but it requires compilation and for some reason it fails on windows.
Nomid Íkorni-Sciurus
@suisei_v my current emacs setup does autocompletion without tags but requires some hacks for working - and obviously they don't work on windows.
Nomid Íkorni-Sciurus
Vladimir
I can't recommend you anything, but I advice to do more coding work, not looking for a perfect tool. Seems like you tried a lot and want an ideal one, but I advice you just pick one IDE and use it.
Nomid Íkorni-Sciurus
Nomid Íkorni-Sciurus
I'm looking for something that supports LLVM but I didn't have much luck.
Vladimir
Nomid Íkorni-Sciurus
Vladimir
Nomid Íkorni-Sciurus
What do you mean 'supports'?
For example
Eclipse does build and debug with clang and lldb and actually, except some horrible bugs, it works but it's very buggy.
Nomid Íkorni-Sciurus
(and relies on Cygwin)
Vladimir
Nomid Íkorni-Sciurus
you mean, to create a json build target and then using some language server for lldb
Vladimir
I didn't mean it but you can try
Vladimir
LLVM is easily installes inside cygwin/mingw
Vladimir
What's problem
Nomid Íkorni-Sciurus
I didn't really use cygwin very much. Can built binaries be run outside of Cygwin?
Nomid Íkorni-Sciurus
If I build a project with gcc or clang in a cygwin environment, I think it will have issues with paths for runtime libraries.
Vladimir
I used mingw, don't know much about cygwin
Vladimir
You can try install LLVM inside WSL
Vladimir
Vladimir
I'm not sure about details
Vladimir
Nomid Íkorni-Sciurus
Nomid Íkorni-Sciurus
Anonymous
#include <stdio.h>
#include<string.h>
struct student
{
char name[50];
int roll;
float marks;
} s[10];
int main()
{
int n;
printf("Enter the number of students:");
scanf("%d",&n);
int i,j;
printf("Enter information of students:\n");
for (i = 0; i <n ; ++i)
{
printf("Enter roll:");
scanf("%d",&s[i].roll);
printf("Enter name: ");
scanf("%s", s[i].name);
printf("Enter marks: ");
scanf("%f", &s[i].marks);
printf("\n");
}
printf("Displaying Information:\n");
char temp[50];
for (i = 0; i < n-1; ++i)
for (j = i + 1; j < n; ++j)
{
if (strcmp(s[i].name, s[j].name) > 0)
{
strcpy(temp, s[i].name);
strcpy(s[i].name, s[j].name);
strcpy(s[j].name, temp);
}
}
printf("Ascending order: \n");
for (i = 0; i < n; ++i)
{
puts(s[i].name);
printf("Roll number: %d\n",s[i].roll);
printf("Marks: %.1f", s[i].marks);
printf("\n");
}
}
Anonymous
I want to get the roll no and marks to be associated with name
The name is sorted but marks and roll no isnt same as while giving input
Talula
Isn't this ad?
Anonymous
Hey all, we're looking for a programmer to take over a project we hired another developer for - but who didn't finish the project. This is a long term project, consistent pay for consistent work. If you're familiar with reverse engineering, game bots, than please get in touch with me. Our project has a lot of work done but we're looking for someone to take it over, continue it's development, and help us get it to a full release and then maintain it. Thanks.
Optimus
I want to know What happens when u make call "delete this;"?
Pavel
I want to know What happens when u make call "delete this;"?
The same as if you will have any other pointer to your object (e.g. passed as a parameter to a member function), so it's just a pointer.
What happens is the object being deleted.
- If the object was not created by new it's UB.
- After deleting the object, this is a dangling pointer, so any other operation on it (on the object you're working on) will be UB.
You can think of member function call as of a call where the object passed by pointer as an argument named this.
Anonymous
Anonymous
Can anyone help me understand this and in writing this in C
Mat
Anonymous
Anonymous
Only pointers to objects :)
Pavel
Pavel
But yes, fixed it
Kushal
Thank you
Ahmed
Set resolution of image using GDI+ any idea ??
Anonymous
Can anyone explain this
I_Interface
why photo ? read the rules
I_Interface
delete it and write a normal code here
Anonymous
int main()
{
Static int i=5;
if(--i)
{
main();
printf("%d",i);
}
}
Please explain this
Hayk
Anonymous
Why
Hayk
Why
This is from stackoverflow
How is it legal to call the main() function recursively in C++
It is not legal. The C++ language standard states that "The function main shall not be used within a program" (C++11 §3.6.1/3). Calling the function is a form of "use."
Any program that calls main() exhibits undefined behavior (technically, such a program is ill-formed because the rule being violated is a diagnosable semantic rule, though I'd be surprised if most compilers rejected the program). Note that this does not prevent the runtime infrastructure that starts your program from calling the main()function.
Anonymous
It is giving
0
0
0
0
Output
Anonymous
But why .... I need explanation
Anonymous
This was question in my exam
Anonymous
I didn't understood
Anonymous
So I asked her
Anonymous
Here*
Azzam
I_Interface
english only
Dima
Skratatatata
Dima
/warn Read the rules
Anonymous
How to save long long char,
ex: I want to save 1 to 9 letters as sentence or name
Mat
Anonymous
Anonymous
What language?
Anonymous
C or C++?
Anonymous
Mat
Anonymous
Use std::string
Anonymous
I got it, tnx
Anonymous
#include <string>
int main() {
std::string s;
std::cin >> s;
std::cout << s << std::endl;
return 0;
}
Is that right?
I_Interface
Anonymous
You forgot to #include <iostream>