C/C++ IDE with Predictive Text (like Microsoft Visual Studio "Intellisense")?

Ray

Active Member
Adept
Apr 17, 2010
219
35
41
Is there any C/C++ IDE that supports predictive text like Microsoft Visual Studio (Intellisense)??
 

Chaos

Well-Known Member
Veteran
Jan 29, 2005
9,035
871
252
On what platform? Why don't you use visual studio itself? For Unix/Linux platforms, the only major choice is eclipse.
 

krishnandu

Well-Known Member
Veteran
Dec 25, 2009
1,833
216
102
29
Kolkata
www.krishnandusarkar.com
As suggested above you can go with VS. VS supports both Managed and Unmanaged C++.

But don't expect C / C++ suggestions and autocompletion to work as good as like as in .NET.

.NET is famous for these things though :p

Anyway, there's a logic behind that. The reason you get such a good suggestion and auto-completion because of the Metadata which is not there in C/C++. All the codes that are compiled under managed environment CLR creates the metadata file which is actually used by the IDE to read and provide the suggestions and autocompletion.

So, as long as you code in Managed C++ in VS it's fine, but don't expect Unmanaged C++ and C (It's always unmanaged) to be as good as in managed.

Hope that clears your funda :)

Else, correct me if I'm wrong. :)
 

Ray

Active Member
Adept
Apr 17, 2010
219
35
41
As suggested above you can go with VS. VS supports both Managed and Unmanaged C++.

But don't expect C / C++ suggestions and autocompletion to work as good as like as in .NET.

.NET is famous for these things though :p

Anyway, there's a logic behind that. The reason you get such a good suggestion and auto-completion because of the Metadata which is not there in C/C++. All the codes that are compiled under managed environment CLR creates the metadata file which is actually used by the IDE to read and provide the suggestions and autocompletion.

So, as long as you code in Managed C++ in VS it's fine, but don't expect Unmanaged C++ and C (It's always unmanaged) to be as good as in managed.

Hope that clears your funda :)

Else, correct me if I'm wrong. :)
I only used Visual Studio to code in C# and the autocomplete was incredible.I was hoping to find an IDE a bit lighter on my ageing laptop with low RAM and which takes less diskspace.[DOUBLEPOST=1406860452][/DOUBLEPOST]
On what platform? Why don't you use visual studio itself? For Unix/Linux platforms, the only major choice is eclipse.
On windows 8.eclipse does not support suggest-as-you-type autocomplete like visual studio.you have press ctrl+space or .. etc
 

ReVo_007

#techie
Section Mod
Apr 28, 2010
849
41
48
Kolkata
You can try codeblocks , else you can go for sublime text 2 and then compile and run via terminal or command prompt .
 

ReVo_007

#techie
Section Mod
Apr 28, 2010
849
41
48
Kolkata

booo

BA BA BA BABANANA
Veteran
Mar 4, 2008
1,738
1,782
403
Colodaro
ctrl+N ctrl+p if you didnt knew already. anyways IMO nothing beats visual studio for intellisense. We used to use visual assist long time back. it was good too.
 

pauldmps

Well-Known Member
Veteran
Mar 20, 2011
1,387
214
101
27
Use Eclipse with CDT plugin & miniGW compiler(has o be installed separately). Autocompletion works great except that you'll have to press ctrl+space for suggestions.
 

arnuld

Member
Disciple
Jan 7, 2009
95
7
21
38
lispmachine.wordpress.com
Is there any C/C++ IDE that supports predictive text like Microsoft Visual Studio (Intellisense)??
Well, you can use Code::Blocks or Eclipse but the real question you need to ask yourself is why you want to have predictive text when you are writing C/C++ code ? Why not without predictive text ?
 

booo

BA BA BA BABANANA
Veteran
Mar 4, 2008
1,738
1,782
403
Colodaro
Why not without predictive text ?
because predictive text makes coding faster. atleast by 10 times if you use MS. as a principle I dont remember the member variables and function signatures. because simple mistakes can lead to very tricky to find bugs. so, I always refer to the manual while writing code, intellisense makes it much faster.
 
  • Like
Reactions: tommy_vercetti

arnuld

Member
Disciple
Jan 7, 2009
95
7
21
38
lispmachine.wordpress.com
because predictive text makes coding faster. atleast by 10 times if you use MS. as a principle I dont remember the member variables and function signatures. because simple mistakes can lead to very tricky to find bugs. so, I always refer to the manual while writing code, intellisense makes it much faster.
You don't remember the variables and function signatures because of two reasons:
  1. You did not name them properly (read "Practice of Programming" by Kernighan and Pike)
  2. You did not follow any coding standard for writing function signatures (read "Practice of Programming" by Kernighan and Pike)
Above 2 are the most probable reasons for the problems you are facing. While Intelligent Code Completion (ICC) is a good thing, you can use it to replace your own creativity too e.g by not reading reference manuals, man pages and standard library documentation when you are not coding. Yes, you read that right, reading reference manuals when you are not coding. I know people who keep entire C language in their heads. You can wake them in the middle of night and ask anything about the variable names and function signatures they wrote 5 years back in their previous company (yes, I am one of them). Where do you think they learned that ? And why you think not keeping the language in your head will make you a faster and better programmer ?

In an interview, who do you think will perform better, a programmer who knows the language and has more than half of the language inside his head or the one who depends on ICC ? I have nothing against ICC, its just that programmers mostly use it as a medium to avoid learning about the language and its standard libraries e.g

  • do you know what fget() does that gets() does not
  • why one will prefer fgets() over gets()
  • why fgets() was created when gets() was already there
  • what dose fgets() return on success/failure
  • what type of arguments fgets() take
Can you answer all those without searching on net or looking at the book ? If yes, then congratulations, you are a real programmer but if if you can't then you gotta throw ICC away and start looking at the reference manauls (for above questions, either check out man pages or C Reference Manual by Harbison & Steele)
 
Last edited:

arnuld

Member
Disciple
Jan 7, 2009
95
7
21
38
lispmachine.wordpress.com
^did you ever introspect about how much time you are spending learning the difference between fget and gets?
language is just a spec. just a tool... to solve problems. spend more time solving problems and less learning the language.
I do agree solving-problems is the major task that most programmers do. You missed the point though. This argument: "language is just a tool, so I will spend much time on solving problems rather than language's tools" is the cause of lot of bugs. In my experience, most software engineers solve 70-90% the bugs caused by lack of knowledge of language on their part. Since they don't know how language works they just assume it works their way or in general way and that is where they put a bug. I have worked from small 5 man companies to world's topmost MNCs and this ratio of bugs has remained constant. You yourself want to use ICC because it reduces bugs. 2nd, read Practice of Programming, at least find out who is Rob Pike.

It is just an advice from an experienced programmer,you can take it or leave it. It is INTERNET, does not matter how many people believe what or not :) . It is just that there are good ways to do do coding and many bad ways to do so too. Well, while I have not asked them personally, I am sure Richard Heathfield, Victor Bazarov, Ben Bacarisse,
Pascal Bourguignon, Pascal Constanza, Steve Summit and Keith Thompson will agree with me. At least this is what I have learned from them.
 

booo

BA BA BA BABANANA
Veteran
Mar 4, 2008
1,738
1,782
403
Colodaro
Since they don't know how language works they just assume it works
as a principle I dont remember the member variables and function signatures.
see, now you understand why I don't remember stuff as a principle? Just to be sure that I am not making any assumptions. simple things like reversing "from" and "to" variables in sprintf can wreck havoc.

Anyways, Let me give you an advise too... I have seen few very passionate programmers too. but the problem with passionate/real/hardcore programmers is that they are often rude and arrogant. don't be that.
 
  • Like
Reactions: avi

haraakiri

Active Member
Adept
May 28, 2009
814
24
31
39
Intellisense is not as good for c++ compared to other languages, mostly due to macros. Macros make static analysis hard. Majority of hurdles have beem solved by clang(later by gcc too, though it's not as good) and you coupd get pretty decent intellisense using either xcode on mac or clion on mac or Linux.

If you do not know the difference between fgets and gets, you do not know C. The biggest of problem for C generally is programming writing code without knowing these kinds of issues. If you do not intend to learn these things Java or C# might be a better option.
 

Chaos

Well-Known Member
Veteran
Jan 29, 2005
9,035
871
252
You don't remember the variables and function signatures because of two reasons:
  1. You did not name them properly (read "Practice of Programming" by Kernighan and Pike)
  2. You did not follow any coding standard for writing function signatures (read "Practice of Programming" by Kernighan and Pike)
Above 2 are the most probable reasons for the problems you are facing. While Intelligent Code Completion (ICC) is a good thing, you can use it to replace your own creativity too e.g by not reading reference manuals, man pages and standard library documentation when you are not coding. Yes, you read that right, reading reference manuals when you are not coding. I know people who keep entire C language in their heads. You can wake them in the middle of night and ask anything about the variable names and function signatures they wrote 5 years back in their previous company (yes, I am one of them). Where do you think they learned that ? And why you think not keeping the language in your head will make you a faster and better programmer ?
This is just so wrong I don't know where to start. What you say is true only for toy projects. When Brian Kerninghan and Rob Pike worked on PDP-9/PDP-11 machines, they wrote everything from scratch and the size of code and projects those days were miniscule. While Practice of Programming is a good book to get your basics right, if you build real projects - you must take the advice with a pinch of salt. These days with OSS technologies, one uses tonnes of 3rd party libraries to do whatever they want. No one in his right mind would sit mugging up API docs of some random lib that one is using simply to get the job at hand done. One simply figures out how to use the lib and then build your code around it. Also no decent software project is a single man effort - there will be a bunch of folks working on something and everyone has his own coding style - no matter how much of guidelines are enforced. In such a scenario whatever tool that makes the job of a programmer less painful is welcome.

My personal experience over the past ten years is that many APIs simply evolve in structure every few months/years so that even if you know the API inside out at some point in time, there'll be something changed under the hood the next time you use it. Also some of them are so big that it is humanly impossible to remember everything. I personally work in Computer Graphics and code with C and OpenGL since the last 10+ years. The amount of change GL has seen since I started off in early 2000's is mind boggling. Things change every year as a new version of the API appears and don't get me started on vendor specific extensions. Couple that to the fact that most projects we work on these days require knowledge of OpenCV, Oculus SDK, Leap Motion, Vuforia and the likes, it gets very difficult to even remember the limited subset your application uses.
 

Lord Nemesis

Overlord
Veteran
Jun 3, 2005
5,935
2,403
377
You don't remember the variables and function signatures because of two reasons:
  1. You did not name them properly (read "Practice of Programming" by Kernighan and Pike)
  2. You did not follow any coding standard for writing function signatures (read "Practice of Programming" by Kernighan and Pike)
Above 2 are the most probable reasons for the problems you are facing. While Intelligent Code Completion (ICC) is a good thing, you can use it to replace your own creativity too e.g by not reading reference manuals, man pages and standard library documentation when you are not coding. Yes, you read that right, reading reference manuals when you are not coding. I know people who keep entire C language in their heads. You can wake them in the middle of night and ask anything about the variable names and function signatures they wrote 5 years back in their previous company (yes, I am one of them). Where do you think they learned that ? And why you think not keeping the language in your head will make you a faster and better programmer ?

In an interview, who do you think will perform better, a programmer who knows the language and has more than half of the language inside his head or the one who depends on ICC ? I have nothing against ICC, its just that programmers mostly use it as a medium to avoid learning about the language and its standard libraries e.g

  • do you know what fget() does that gets() does not
  • why one will prefer fgets() over gets()
  • why fgets() was created when gets() was already there
  • what dose fgets() return on success/failure
  • what type of arguments fgets() take
Can you answer all those without searching on net or looking at the book ? If yes, then congratulations, you are a real programmer but if if you can't then you gotta throw ICC away and start looking at the reference manauls (for above questions, either check out man pages or C Reference Manual by Harbison & Steele)

Seriously, are you for real :banghead: :banghead:

Sorry to burst your bubble like this, but this insanity of trying to cram an entire API documentation in your head makes for a really poor excuse for not using the right/good tools. I do agree that having a good grasp on the syntax and semantics of a programming language is important. Following good coding standards and style guide is also equally important for writing maintainable code, but that still is no replacement for using the good/right tools to get the job done. In fact, good tools help you achieve these goals with ease. Trying to cram the API signatures is not only unnecessary, but undesirable.

Regarding who you think performs better in an interview armed with a memory crammed with API signatures, let me assure you that if if you really come to an interview with me (or any of thousands of other people out there) and even accidentally reveal that you have crammed an API documentation into your memory, you would more than likely be rejected on the spot. It doesn't matter that you can write a program accurately to the last semi colon and it compiles on the first try . Interviewers are not looking for how accurately you can recall an API signature. They are looking for how well you can solve a problem and how well you can adapt. The fact that you memorized a API documentation tells an interviewer that you focus your energies on the wrong sort of stuff to be spending it on. They would rather that you demonstrate that you can solve a problem in several different ways or using different tools. Over more than 100 odd interviews that I have done so far for the companies that I worked for, not once have I asked a question that required a candidate to recall an API signature from memory. Even if the job description says that knowledge of some library like MFC is required, I don't care because a candidate with good grasp on C++ and windows programming fundamentals can write better code with the help of online documentation than somebody who has crammed the entire MFC class hierarchy into his memory.

I have delivered work in C++, C#, Java, HTML/JS for Desktop/Server(Windows, Mac, Linux) as well as Mobile (Windows Phone, iOS, Android) and using god knows using how many different standard and third party libraries. I try to grasp only the important bits that need to be taken in and I make it a point to forget everything from the API documentation after I am done with a project. That simply is not stuff that you should be wasting your brain on.
 
Last edited: