strtok() returns a pointer to a string, not the string itself. I recommend going over Salem's post. If you can use and understand the code in that post, you will have fewer problems with future...
Type: Posts; User: shuuhen
strtok() returns a pointer to a string, not the string itself. I recommend going over Salem's post. If you can use and understand the code in that post, you will have fewer problems with future...
How's that needed in alexnb185's code? Wouldn't that just make the user press return or ctrl-D (or if they have a more interesting way of sending EOF...) before typing the name of the app? Reading...
The .app in the output is normal. It's from running open without a valid program name. When you finish typing your input you press return, which signifies a newline in the terminal. fgets() reads...
The .app is there because you're using open to try and open a Mac OS X program. You still need to remove the newline which fgets() reads at the end of your input.
You still don't want...
First, did you take out fflush(stdin)?
Second, what exactly did you type in (including tabs, returns, etc) and what exactly did you get in the buffer (if you print it out)?
stdin counts as a file. Just put stdin where you'd put a file pointer and it reads the keyboard input.
Look into using fgets() to read into a large buffer. Much better than scanf().
Um, no. Mac and Windows are two very different operating systems. windows.h is for Windows programming, not Mac or any other *nix OS. I assume you're trying to get a program running on Mac OS X...
I've liked AVG for the Windows install I have on my laptop. The university I go to recommends some enterprise version of Norton, but I didn't keep it and went back to AVG. I don't use Windows much,...
Is it not in the documentation on Microchip's website? I thought they at least used to have language references somewhere. It was for the C18 compiler when I was using Microchip stuff, but I'd...
Those were my thoughts (well minus the C++ part since I don't know all of the basics of that language). I was explaining to someone why I thought they should always have a defined return value at...
Ah, makes sense. So it's more just a good idea to include the 'return 0;' but not really required. Not that it's hard to type that one extra nine or so characters. I suppose it just bugs me...
I feel kinda dumb asking this question, but I'm in an argument with someone about whether or not to use "return 0;" at the end of main(). I'm not sure if I'm reading the standard wrong, but...
A second language would help, but what language for what country? Would Swahili or Mandarin help in Germany or France?
I'm looking for specific reasons to learn VB.NET. Learning CIL would be...
My reasoning may partially stem from the fact that I do not know a single person (in person, with evidence of their skill) who codes well in both that prefers VB.NET. I still wonder, because I'd...
Just to point out a couple of things. C# is not platform specific. If you really wanted, you could install Linux on a PS2 to compile .NET code. Mono and Portable.NET are two projects to create a...
C++ is a superset of C, but there are many changes, such as scoping. One of the more experienced coders here could probably tell you the differences in great detail.
Instead, see if it works with...
Shouldn't be a problem. At work I have the .NET 1.1 SDK and the .NET 2.0 runtime installed on the same machine. I haven't tried having multiple SDKs, but as far as I know everything is installed to...
Andrew Troelsen's Pro C# 2005 and the .NET 2.0 Platform seems like a decent book so far. Troelsen does know that .NET works on more than Windows (I've read about how he installed Linux on a...
Now for the stupid question (even I, who is asking, thinks it is a dumb question. I have DataGrid on a WebForm in ASP.NET 1.1. I can bind a DataView to it and correctly delete from it or sort it.
...
Install glibc-devel. It should install stdio.h into /usr/include.
I've been experimenting with SDL recently. It's easy to learn the basics of creating a window, processing input, etc. from tutorials you can find on the site. Users will need to make sure they have...