0

I'm currently not able to power on the appliance and hence, I am not able to use gedit. I am thinking about using Notepad or MS Word 2013 to write the code for mario and greedy programs until I solve the appliance issue.

Which one is better Notepad or MS Word 2013? Am I likely to experience compilation errors with Clang compiler, since I typed the programs using Notepad or MS Word 2013?

uma1966

3 Answers 3

1

Well, Microsoft Word and Notepad are two different kinds of applications. Microsoft Word is a word processor while Notepad is a text editor as well as gedit.

Yes, you can write programs using the three of them and this has nothing to do with compilation errors as long as you're saving your files with the correct extensions and avoiding syntax errors.

But the problems is that you'll have to install and configure some tools on Windows beforehand such as clang, the cs50 library, and so on 'cause, unfortunately, they're not installed by default and configured for you as it's the case with the cs50 appliance.

1

You can still use gedit outside of the appliance. You can download it from here. If gedit is a bit too technical, another popular code editor to try is Sublime Text.

If you really must choose between Word or Notepad, then Notepad is the better of the two to write code with.

While you can edit source files in Word there are some reasons not to:

  • It is easy to mistakenly save your files as something other than plain text (like doc, docx, rtf) etc, which includes extra formatting which will cause compiler errors.
  • You will need to change the font to a mono-spaced font (like Courier or Consolas) so that you see code indentations correctly.
  • Word wraps text by default, so if you type a longish line of code, it will go into two lines which can become confusing.
  • Word provides lots of features which have nothing to do with code, and can easily interfere rather than help.
0

In short; No if you compile in the cs50 VM...Yes if you don't.

If you compile your program outside of the CS50 VM you won't be able to use unless you install it separately. Also, compiling outside of cs50 leads to syntax issues...like is it compiling using c90 or c99 (an issue I ran into).

If you are asking about just plain old writing out the code then copy paste the whole thing (or something like that) you should be fine. But I suggest using an IDE to help highlight code and mistakes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .