<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>freedom_doc's Feed - Programmer's Heaven</title>
    <link>http://www.programmersheaven.com/feed/User/282341/RSS.aspx</link>
    <description>Events at Programmer's Heaven related to the user freedom_doc.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Tue, 21 May 2013 01:31:08 -0700</pubDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <item>
      <title>Re: sorting technique c/c++</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C and C++ forum.&lt;/p&gt;Agreed with the previous poster, that you are not likely to get it all coded up for you.&lt;br /&gt;
&lt;br /&gt;
It APPEARS to me that your instructor wants you to use an array of structs for this; that is how I would do it, but I don't know if you have even learned about structs yet.  If not, you might setup 2 arrays, one a string array containing the patient ID and the patient name, and an int array for the ages.  Then write your sort routines where they take 2 arrays, a string array and an int array, and sort these in parallel, first by age in descending order, secondly by the string array in ascending order.&lt;br /&gt;</description>
      <pubDate>Sat, 20 Nov 2010 11:22:20 -0700</pubDate>
    </item>
    <item>
      <title>Re: Serial port programming using Turbo C in WinXP</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the Beginner C/C++ forum.&lt;/p&gt;If you have an old 16-bit compiler, you can do this stuff under XP.  Sounds like you do since you mention Turbo C.  &lt;br /&gt;
&lt;br /&gt;
As for using a more modern compiler in protected mode -- use something like Visual Studio and look up some Win32 calls for doing port stuff.  That is how you "ask the OS" to do things.  I have experience moving a large 16 bit app to 32-bit protected mode and have run into all of these things.  Sounds like you might as well use "tcc" and compile everything that way; you can still do the 16 bit stuff but modern compilers don't do that.&lt;br /&gt;</description>
      <pubDate>Thu, 15 Apr 2010 09:25:40 -0700</pubDate>
    </item>
    <item>
      <title>Re: Serial port programming using Turbo C in WinXP</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the Beginner C/C++ forum.&lt;/p&gt;If you are using a compiler that targets 386 type protected mode (as most do today), then a large amount of the old 16-bit bios stuff will just not work.  The OS has taken over a large chunk of the low level operations and you have to ask it to do those things for you.&lt;br /&gt;
&lt;br /&gt;
You can do the things you want with an old 16-bit compiler, but you will be limited to 640K and the old memory models.  The default memory model was "small", which is one 64K data segment and one 64K code segment.  Most serious programs today need more.&lt;br /&gt;</description>
      <pubDate>Thu, 15 Apr 2010 06:38:15 -0700</pubDate>
    </item>
    <item>
      <title>Re: Serial port programming using Turbo C in WinXP</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the Beginner C/C++ forum.&lt;/p&gt;I don't think you can do that stuff in Win32; if you need Win32 then you need to look up equivalent Win32 calls that do the same type of thing (but then you are asking permission of the OS to do it, which will slow things down a bit).  Search for Win32 port stuff and see what you can find.&lt;br /&gt;</description>
      <pubDate>Tue, 13 Apr 2010 16:03:17 -0700</pubDate>
    </item>
    <item>
      <title>Re: Problems with user input functions</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the Beginner C/C++ forum.&lt;/p&gt;scanf is somewhat problematic in this type of thing, especially where you are mixing different types of inputs.  But the first thing you have to realize is that scanf STOPS on white space.  So if you have&lt;br /&gt;
&lt;br /&gt;
scanf("%s", name);  where 'name' is a string and in response you put&lt;br /&gt;
Douglas White&lt;br /&gt;
&lt;br /&gt;
then name will only be Douglas.&lt;br /&gt;
White would then go to feed other inputs later on.&lt;br /&gt;
&lt;br /&gt;
You should use fgets instead of scanf.  It does NOT stop on white space.&lt;br /&gt;
But it only inputs into a string.  Use it like&lt;br /&gt;
&lt;br /&gt;
fgets(string, 100, stdin);&lt;br /&gt;
&lt;br /&gt;
This reads chars into 'string' up to a max of 100 characters, or until EOL or EOF (end of line or end of file).  If you need integer&lt;br /&gt;
or floating point values from this use&lt;br /&gt;
double x;&lt;br /&gt;
int n;&lt;br /&gt;
n = atoi(string);&lt;br /&gt;
or &lt;br /&gt;
x = atof(string);&lt;br /&gt;
&lt;br /&gt;
Be sure to #include &amp;lt;stdlib.h&amp;gt; and &amp;lt;stdio.h&amp;gt; for these.&lt;br /&gt;</description>
      <pubDate>Sun, 11 Apr 2010 16:34:49 -0700</pubDate>
    </item>
    <item>
      <title>Re: Convert String to Integer in C</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C and C++ forum.&lt;/p&gt;Your declaration &lt;br /&gt;
&lt;br /&gt;
char *s[10];&lt;br /&gt;
&lt;br /&gt;
is wrong, it should just be&lt;br /&gt;
&lt;br /&gt;
char s[10];&lt;br /&gt;
&lt;br /&gt;
Also when you type in a date in response to&lt;br /&gt;
scanf("%s", s);&lt;br /&gt;
be sure not to put any "white space" like blanks in between fields.&lt;br /&gt;
"White space" is blanks, newline, and a few other characters...&lt;br /&gt;
I don't think '/' is white space but if it is, that would explain&lt;br /&gt;
why 12/10/99 would come out&lt;br /&gt;
December 0 0&lt;br /&gt;</description>
      <pubDate>Sun, 11 Apr 2010 09:51:56 -0700</pubDate>
    </item>
    <item>
      <title>Re: Help with loop</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the Beginner C/C++ forum.&lt;/p&gt;Another thing you might do to lessen the effort:&lt;br /&gt;
When checking for alphabetic characters, just #include &amp;lt;ctype.h&amp;gt;&lt;br /&gt;
and then instead of&lt;br /&gt;
if (c &amp;gt;= 'a' &amp;amp;&amp;amp; c &amp;lt;= 'z' || c &amp;gt;= 'A' &amp;amp;&amp;amp; c &amp;lt;= 'Z')&lt;br /&gt;
&lt;br /&gt;
you can have&lt;br /&gt;
if (isalpha(c))&lt;br /&gt;
&lt;br /&gt;
-- same result&lt;br /&gt;</description>
      <pubDate>Sun, 11 Apr 2010 09:26:38 -0700</pubDate>
    </item>
    <item>
      <title>Re: Trouble passing arguments to a function</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C and C++ forum.&lt;/p&gt;I think the main problem here is your use of array dimensions with 9 the first and blank for the second.  IN C you need not specify the first dimension to an array parameter BUT you need all the rest!  Reverse these.&lt;br /&gt;</description>
      <pubDate>Sun, 15 Mar 2009 17:08:10 -0700</pubDate>
    </item>
    <item>
      <title>Re: Trouble passing arguments to a function</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C and C++ forum.&lt;/p&gt;You said "how can I pass a struct to a function when they are defined in different headers"?&lt;br /&gt;
&lt;br /&gt;
The answer is to include the header file with the struct in the header file where you have your code that calls for the struct.  Indeed, where ever it is that you mention the struct, that code needs to #include the header that has the struct.&lt;br /&gt;
&lt;br /&gt;
Are you using C or C++ ? (understand these are DIFFERENT languages).&lt;br /&gt;
Also if the above doesn't fix your problem we will need to see more code.&lt;br /&gt;</description>
      <pubDate>Sun, 15 Mar 2009 09:04:32 -0700</pubDate>
    </item>
    <item>
      <title>Re: is it possible to have a music player in a C program?</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C and C++ forum.&lt;/p&gt;The answer is yes.&lt;br /&gt;
&lt;br /&gt;
However, for what?  Since we have multitasking, you can play whatever you like while your C code runs.  What is your application for, some embedded system that doesn't have this?&lt;br /&gt;</description>
      <pubDate>Sun, 15 Mar 2009 08:40:27 -0700</pubDate>
    </item>
    <item>
      <title>Re: help me pls regarding file handling...</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C and C++ forum.&lt;/p&gt;In the first place, we aren't here to do your homework.  And if we did, you would not learn ANYTHING, because learning programming can only be done by DOING programming.&lt;br /&gt;
&lt;br /&gt;
In the 2nd place, I am not sure what level you are at, what you actually know already and what you should be learning now -- so to jump right in and tell you about #include &amp;lt;fstream&amp;gt; and declaring a file like ofstream file("output.dat"); to output your data to --- for all I know your teacher wants you to use fopen!&lt;br /&gt;
&lt;br /&gt;
Point is, you need to be more specific about what you know and don't know, and what you are really having trouble with -- over and above "please write my code for me".&lt;br /&gt;</description>
      <pubDate>Mon, 09 Mar 2009 11:10:58 -0700</pubDate>
    </item>
    <item>
      <title>Re: Program to interface a parallel port to pc.</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C and C++ forum.&lt;/p&gt;If you are doing this in 32 bit Windows, you need to look for Windows API calls to help you with this.  In the old DOS days, port control was left to the programmer (as was pretty much the entire machine).  Modern day systems have the OS controlling nearly all the machine and you have to go through the system to get the information you need.  Look on the web for Win API calls to control the parallel port.</description>
      <pubDate>Thu, 08 Jan 2009 08:02:08 -0700</pubDate>
    </item>
    <item>
      <title>Re: How to find size of an array created by the new operator</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C and C++ forum.&lt;/p&gt;: : : let 'array' be a pointer to array of integers as follows&lt;br /&gt;
: : : &lt;br /&gt;
: : :   eg. int *array=new int[250];&lt;br /&gt;
: : : &lt;br /&gt;
: : : I want to find size of this array and want to print it in screen.&lt;br /&gt;
: : : &lt;br /&gt;
: : : Will you help me.&lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : There is no programmatic way to do this, i.e. if you don't know the &lt;br /&gt;
: : size already, there is no way for C++ to tell you.  All it can tell &lt;br /&gt;
: : you about "array" is that it is a pointer to int, size being 4 on a &lt;br /&gt;
: : 32 bit system.&lt;br /&gt;
: : &lt;br /&gt;
: &lt;span style="color: Blue;"&gt;&lt;br /&gt;
: Here is a small code sample:&lt;br /&gt;
: &lt;/span&gt;&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;: 
: CString* array = new CString [256];
: 
: // ... having some fun here with the array ...
: 
: delete [] array;
: &lt;/pre&gt;: &lt;br /&gt;
: &lt;span style="color: Blue;"&gt;That last line of code (with 'delete') calls all 256 &lt;br /&gt;
: destructors of CString. How does compiler 'know' that there was 256 &lt;br /&gt;
: allocated?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The compiler knows but it will not tell you.&lt;br /&gt;
It all goes back to the same problem in C -- an array is just a pointer (once passed to a function, anyway) and contains no other information that might tell you its 'size'.&lt;br /&gt;</description>
      <pubDate>Fri, 26 Dec 2008 17:45:38 -0700</pubDate>
    </item>
    <item>
      <title>Re: How to find size of an array created by the new operator</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C and C++ forum.&lt;/p&gt;: let 'array' be a pointer to array of integers as follows&lt;br /&gt;
: &lt;br /&gt;
:   eg. int *array=new int[250];&lt;br /&gt;
: &lt;br /&gt;
: I want to find size of this array and want to print it in screen.&lt;br /&gt;
: &lt;br /&gt;
: Will you help me.&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
There is no programmatic way to do this, i.e. if you don't know the size already, there is no way for C++ to tell you.  All it can tell you about "array" is that it is a pointer to int, size being 4 on a 32 bit system.&lt;br /&gt;</description>
      <pubDate>Fri, 26 Dec 2008 14:34:31 -0700</pubDate>
    </item>
  </channel>
</rss>