C/C++ Beginner's Guide and Post Basic Questions here

OP
Liverpool_fan

Liverpool_fan

Sami Hyypiä, LFC legend
Joined
Jun 19, 2007
Messages
2,187
Well I don't recommend C for a beginner programmer but if you insist go for "C for Dummies", it does begin from scratch.

Sorry, but I've been out of touch with C for a long time now. Can anyone tell me what's wrong with conio.h? I mean, I know that its hard to use it in gcc (you have to use ncurses or something like that instead, if I am not wrong).

Also, what's wrong with "void main()"?
Good that your query has been answered but again, how difficult is actually reading the thread?
 

rahul_c

Journeyman
Joined
Oct 2, 2010
Messages
219
Well I don't recommend C for a beginner programmer but if you insist go for "C for Dummies", it does begin from scratch

B. Tech in CS begins programming with C, so I don't have a choice. Do I really need to buy a separate book? Does Head First C starts with that much high level? Which language do you suggest for a absolute beginner anyways?

A separate thing, I need GCC compiler but the one I downloaded (MinGW-get) does not work offline. From where can I get the offline version of GCC?
 
OP
Liverpool_fan

Liverpool_fan

Sami Hyypiä, LFC legend
Joined
Jun 19, 2007
Messages
2,187
HFC does require *some* programming experience. Not advanced but a basic familiarity with programming will do. Either you can learn online (links are there in the OP) and then begin with it, or buy C for dummies if you don't find them right for your needs.

As far as "offline compiler" is concerned, get Codeblocks IDE which bundles MinGW itself.
 

rahul_c

Journeyman
Joined
Oct 2, 2010
Messages
219
I do have Code::blocks but HFC uses GCC through out the book, I'm not sure if they are different or same.
 

krishnandu.sarkar

Simply a DIGITian
Staff member
Joined
Nov 13, 2007
Messages
4,671
Code::Blocks uses gcc as it's compiler. Don't worry.

Genrally the path to GCC in your case would be : C:\Program Files (x86)\CodeBlocks\MinGW\bin.

You can add this path to PATH variable and use gcc and g++ from Command Line too :)
 

rahul_c

Journeyman
Joined
Oct 2, 2010
Messages
219
^Thanks then, I will just use Head First C with code::blocks and refer to internet or "you guys" if I've any *fundamental* problem. :)
 

Anurup

Broken In
Joined
Jul 12, 2012
Messages
72
Guyz...want to know if Dev-C++ will work on win7 64bit....and also can any1 provide me with the link to the download of Dev -C++(the latest version).......and is programming on it similar to Borland C++?
Some of my classmates r saying that its better to use Eclipse ...is this true..if so what dvantages does it hv?

many say that "Dev-C++ is a crappy old buggy and unsupported IDE" ...is this true...if so which compiler should i opt for...os is win 7 64bit
 

RBX

In the zone
Joined
May 26, 2008
Messages
405
Using GCC 4.7.0 on Fedora 17. I'm getting following error while trying to execute the output file -
Code:
bash: ./Play_Remember_The_Name.out: Permission denied

I've tried chmod / chown.

Edit:
Apparently , it has something to do with the output being on a non Linux partition. Can something be done while compiling, or later to allow the file to run even when it is on NTFS partition ?

Edit:
found solution here
*askubuntu.com/questions/18052/exe-file-permission-fail/18053
 
Last edited:

sling-shot

Wise Old Owl
Joined
Jun 10, 2012
Messages
1,749
So what is Qt w.r.t. to this thread? Qt - Cross-platform application and UI framework — Qt - A cross-platform application and UI framework

I have read so many glowing tributes about it being very easy to write beautiful cross-platform applications with.

NOTE : Was unable to search this thread because qt is too short for the search bot.
 

nims11

BIOS Terminator
Joined
Apr 29, 2008
Messages
980
So what is Qt w.r.t. to this thread? Qt - Cross-platform application and UI framework — Qt - A cross-platform application and UI framework

I have read so many glowing tributes about it being very easy to write beautiful cross-platform applications with.

NOTE : Was unable to search this thread because qt is too short for the search bot.
What do you want to know about Qt?
 

sling-shot

Wise Old Owl
Joined
Jun 10, 2012
Messages
1,749
I was thinking if Qt would be a good place to begin programming?
And I did not grasp the concept of what is Qt exactly... Is it a programming language or IDE or a library or what?
 

Vyom

The Power of x480
Staff member
Admin
Joined
May 16, 2009
Messages
7,046
Is C# a good language to learn along with .net ???

C# is one of the main languages to learn along with .net.
And knowledge of C / C++ will be an added advantage, before you attempt to study C#.net.
 

nbaztec

Master KOD3R
Joined
Sep 11, 2010
Messages
342
Yes, If you have prior knowledge of VB, you can instead go with VB.NET. C#.NET & VB.NET are isomorphic.
 

the_conqueror

Ambassador of Buzz
Joined
Mar 7, 2012
Messages
524
I installed codeblocks with the MinGW compiler. Ran it and selected gcc as the default compiler. When I run a C program , it runs fine. But a C++ program gives error that iostream not found. How can an important header file appear missing in library. Whats going wrong ?
 

rajatGod512

N00B Troller
Joined
Aug 7, 2011
Messages
938
^^ Simple and easy way : Did You download CodeBlock mingw-setup or not as mingw setup contains the GCC Compiler and GDB Debugger , if you have done that make sure to use GNU GCC Compiler when you maker a program of C++.
 
Last edited:

krishnandu.sarkar

Simply a DIGITian
Staff member
Joined
Nov 13, 2007
Messages
4,671
I installed codeblocks with the MinGW compiler. Ran it and selected gcc as the default compiler. When I run a C program , it runs fine. But a C++ program gives error that iostream not found. How can an important header file appear missing in library. Whats going wrong ?

^^ Simple and easy way : Did You download CodeBlock mingw-setup or not as mingw setup contains the GCC Compiler and GDB Debugger , if you have done that make sure to use GNU GCC Compiler when you maker a program of C++.

Well he says that he downloaded Codeblocks with MinGW Compiler. Also he clearly states that C Program runs fine. So it's not a problem of Compiler or the Package that he downloaded.

@the_conqueror Can you please provide the piece of C++ program you are trying to run?
 

nims11

BIOS Terminator
Joined
Apr 29, 2008
Messages
980
^^ The world has changed a lot since Turbo C++,
Code:
#include<iostream>
using namespace std;
int main()
{
  int x,y;
  cin>>x;
  cout<<x;
  cin>>y;
  cout<<y;
  return 0;
}
 

krishnandu.sarkar

Simply a DIGITian
Staff member
Joined
Nov 13, 2007
Messages
4,671
@the_conqueror That's what I thought you'd have been using. That's why I asked to post the code. Refer ^^his code.
 
Top