<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>virtual_arts's Feed - Programmer's Heaven</title>
    <link>http://www.programmersheaven.com/feed/User/327520/RSS.aspx</link>
    <description>Events at Programmer's Heaven related to the user virtual_arts.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Wed, 19 Jun 2013 11:25:01 -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: the position after the last element of an array</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/423554/423559/ReadMessage.aspx#423559</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/beginnercpp/423554/423559/ReadMessage.aspx#423559"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/beginnercpp/Board.aspx"&gt;Beginner C/C++&lt;/a&gt; forum.&lt;/p&gt;Well, not exactly. What it means is that you do not have &lt;strong&gt;"array bounds checking"&lt;/strong&gt; in C. That is to say, you can go on accessing the locations even beyond the logical upper limit of your array, and C won't complain.&lt;br /&gt;
&lt;br /&gt;
But &lt;strong&gt;this is not&lt;/strong&gt; a &lt;strong&gt;secure&lt;/strong&gt;, and for that matter &lt;strong&gt;not at all a good programming practice&lt;/strong&gt;. A programmer should always include a check to prevent code that tries to access elements beyond array limits. Object oriented programming languages like Java inherently include this "array bound checking" and will not allow you to execute a code that tries to access elements beyond your allocated array.&lt;br /&gt;
&lt;br /&gt;
Why this is not secure is because you may end up accessing memory locations that are not "legally" allocated to your program. This can cause &lt;strong&gt;serious security issues&lt;/strong&gt;. Being able to pry the code of other applications is not in the best interest of many. A particular attack called &lt;strong&gt;"Buffer overflow attack"&lt;/strong&gt; exploits the absence of array bound checking codes to gain unauthorized access to memory locations and manipulate the code there.&lt;br /&gt;
&lt;br /&gt;
Further issues may be caused since this can lead to &lt;strong&gt;unstable programs&lt;/strong&gt;, crashing your applications, and even hanging your system.&lt;br /&gt;
&lt;br /&gt;
Good luck&lt;br /&gt;
Happy coding :)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/423554/423559/ReadMessage.aspx#423559</guid>
      <pubDate>Sat, 30 Apr 2011 19:50:35 -0700</pubDate>
    </item>
    <item>
      <title>Re: converting numbers to words using string</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/385764/386216/ReadMessage.aspx#386216</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/beginnercpp/385764/386216/ReadMessage.aspx#386216"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/beginnercpp/Board.aspx"&gt;Beginner C/C++&lt;/a&gt; forum.&lt;/p&gt;thank you bro1 i'll keep that in mind!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/385764/386216/ReadMessage.aspx#386216</guid>
      <pubDate>Sun, 22 Feb 2009 23:05:43 -0700</pubDate>
    </item>
    <item>
      <title>Re: converting numbers to words using string</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/385764/385969/ReadMessage.aspx#385969</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/beginnercpp/385764/385969/ReadMessage.aspx#385969"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/beginnercpp/Board.aspx"&gt;Beginner C/C++&lt;/a&gt; forum.&lt;/p&gt;wow! i would like to know more about "standard" c/c++ functions.. where do i get them?? i'll try searching them out, but a more specific address would be great :)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/385764/385969/ReadMessage.aspx#385969</guid>
      <pubDate>Thu, 19 Feb 2009 05:25:15 -0700</pubDate>
    </item>
    <item>
      <title>Re: Appending user inputs to string arrays...</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/385808/385967/ReadMessage.aspx#385967</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/beginnercpp/385808/385967/ReadMessage.aspx#385967"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/beginnercpp/Board.aspx"&gt;Beginner C/C++&lt;/a&gt; forum.&lt;/p&gt;hey thanks guys!! those were valuable pieces of information.. :)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/385808/385967/ReadMessage.aspx#385967</guid>
      <pubDate>Thu, 19 Feb 2009 04:53:22 -0700</pubDate>
    </item>
    <item>
      <title>Re: need COBOL forum</title>
      <link>http://www.programmersheaven.com/mb/languages/385913/385966/ReadMessage.aspx#385966</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/languages/385913/385966/ReadMessage.aspx#385966"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/languages/Board.aspx"&gt;New programming languages&lt;/a&gt; forum.&lt;/p&gt;of course buddy! COBOL is alive...lets say, hibernating though!! :)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/languages/385913/385966/ReadMessage.aspx#385966</guid>
      <pubDate>Thu, 19 Feb 2009 04:51:59 -0700</pubDate>
    </item>
    <item>
      <title>need COBOL forum</title>
      <link>http://www.programmersheaven.com/mb/languages/385913/385913/ReadMessage.aspx#385913</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/languages/385913/385913/ReadMessage.aspx#385913"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/languages/Board.aspx"&gt;New programming languages&lt;/a&gt; forum.&lt;/p&gt;I think there should be a forum dedicated to COBOL..it's high time we realised that the COBOL language is not dead.The process of its revival is going on.&lt;br /&gt;
&lt;br /&gt;
The scenario is getting more exciting with web and database capabilities being added to COBOL specification.&lt;br /&gt;
&lt;br /&gt;
I strongly believe there should be a dedicated forum for COBOL in Programer's Heaven&lt;br /&gt;
&lt;br /&gt;
PS : guess what? they are now speaking of COBOL and cloud computing!!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/languages/385913/385913/ReadMessage.aspx#385913</guid>
      <pubDate>Wed, 18 Feb 2009 05:44:35 -0700</pubDate>
    </item>
    <item>
      <title>Re: Appending user inputs to string arrays...</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/385808/385912/ReadMessage.aspx#385912</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/beginnercpp/385808/385912/ReadMessage.aspx#385912"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/beginnercpp/Board.aspx"&gt;Beginner C/C++&lt;/a&gt; forum.&lt;/p&gt;try the following code:-&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
int acceptNames(){
  char names[][15]; //max 14 characters per name
  char tmpname[15];
  int i = 0, done = 0; // set flags and initialize counter
  do{
    printf("\nName %d : ",i+1);
    scanf(" %[^\n]",tmpname); // alternatively use: gets(tmpname);
    if(strcmp(tmpname,"DONE") == 0){// if "DONE"
      done = 1;
    }
    else{
      strcpy(names[i],tmpname);// copy name to array
    }
    ++i; // increment counter
  }while(!done);// repeat while done != 0
  return(i); // return the number of names read
}
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/385808/385912/ReadMessage.aspx#385912</guid>
      <pubDate>Wed, 18 Feb 2009 05:05:10 -0700</pubDate>
    </item>
    <item>
      <title>Re: free compiler c++</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/385497/385848/ReadMessage.aspx#385848</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/beginnercpp/385497/385848/ReadMessage.aspx#385848"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/beginnercpp/Board.aspx"&gt;Beginner C/C++&lt;/a&gt; forum.&lt;/p&gt;you could try Bloodshed Dev C++....its free and under GNU public licence...its pretty good...&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/385497/385848/ReadMessage.aspx#385848</guid>
      <pubDate>Tue, 17 Feb 2009 05:50:08 -0700</pubDate>
    </item>
    <item>
      <title>Re: how to find the mode using c++</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/385831/385847/ReadMessage.aspx#385847</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/beginnercpp/385831/385847/ReadMessage.aspx#385847"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/beginnercpp/Board.aspx"&gt;Beginner C/C++&lt;/a&gt; forum.&lt;/p&gt;yes, you are right....the problem where you have said it is....&lt;br /&gt;
in fact you have to use nested loops to count occurrences of each number, and finally come out with the largest one..&lt;br /&gt;
&lt;br /&gt;
for example, you could try out the following snippet:-&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;

int count[20] = {0};// initialize all cells to 0
int largestcount,mode;

for(i=0;i&amp;lt;n;i++){
  for(j=0;j&amp;lt;n;j++){
    if(i != j){ //avoid comparing number with itself
      if(N[i] == N[j]){
        ++count[i]; // increment corresponding count
      }
    }
  }
}

mode = N[0];
largestcount = count[0];
// find largest count, and hence the mode
for(i=0;i&amp;lt;n;i++){
  if(count[i] &amp;gt; largestcount){
    largestcount = count[i];
    mode = N[i];
  }
}

&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
PS: plz compile and make sure its error free before you use it :)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/385831/385847/ReadMessage.aspx#385847</guid>
      <pubDate>Tue, 17 Feb 2009 05:46:22 -0700</pubDate>
    </item>
    <item>
      <title>Re: converting numbers to words using string</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/385764/385846/ReadMessage.aspx#385846</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/beginnercpp/385764/385846/ReadMessage.aspx#385846"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/beginnercpp/Board.aspx"&gt;Beginner C/C++&lt;/a&gt; forum.&lt;/p&gt;alright...thanks!! i just mentioned since i saw them in turbo c++ documentation&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/385764/385846/ReadMessage.aspx#385846</guid>
      <pubDate>Tue, 17 Feb 2009 05:45:13 -0700</pubDate>
    </item>
    <item>
      <title>Re: converting numbers to words using string</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/385764/385842/ReadMessage.aspx#385842</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/beginnercpp/385764/385842/ReadMessage.aspx#385842"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/beginnercpp/Board.aspx"&gt;Beginner C/C++&lt;/a&gt; forum.&lt;/p&gt;iam sorry, i didn't get the meaning of 'valid' functions....i would appreciate it if you could clarify.....thanks in advance,,&lt;br /&gt;
:)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/385764/385842/ReadMessage.aspx#385842</guid>
      <pubDate>Tue, 17 Feb 2009 05:18:08 -0700</pubDate>
    </item>
    <item>
      <title>Re: code for c++ antivirus</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/385397/385840/ReadMessage.aspx#385840</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/CandCPP/385397/385840/ReadMessage.aspx#385840"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/CandCPP/Board.aspx"&gt;C and C++&lt;/a&gt; forum.&lt;/p&gt;yeah! thats right....i dont think anyone in the righr frameset of mind should use an opensource antivirus....of course its great to have them for academic purposes....but making the source code of your antivirus program public and expecting it to be a success is...well...lets say...utopian!&lt;br /&gt;
&lt;br /&gt;
anyway thanks for info on clamwin....i was looking for one myself!! &lt;br /&gt;
cheers!&lt;br /&gt;
:)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/385397/385840/ReadMessage.aspx#385840</guid>
      <pubDate>Tue, 17 Feb 2009 04:50:38 -0700</pubDate>
    </item>
    <item>
      <title>Re: converting numbers to words using string</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/385764/385768/ReadMessage.aspx#385768</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/beginnercpp/385764/385768/ReadMessage.aspx#385768"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/beginnercpp/Board.aspx"&gt;Beginner C/C++&lt;/a&gt; forum.&lt;/p&gt;hey! thanks malcolm! your reply enlightened me....i couldn't get the idea of the problem at first.....&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/385764/385768/ReadMessage.aspx#385768</guid>
      <pubDate>Mon, 16 Feb 2009 05:38:30 -0700</pubDate>
    </item>
    <item>
      <title>Re: converting numbers to words using string</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/385764/385766/ReadMessage.aspx#385766</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/beginnercpp/385764/385766/ReadMessage.aspx#385766"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/beginnercpp/Board.aspx"&gt;Beginner C/C++&lt;/a&gt; forum.&lt;/p&gt;couldn't grab the idea of 'converting number to words'..&lt;br /&gt;
but if you mean converting an int(or long int) to string, try using the itoa(), or ltoa() functions&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/385764/385766/ReadMessage.aspx#385766</guid>
      <pubDate>Mon, 16 Feb 2009 05:31:14 -0700</pubDate>
    </item>
    <item>
      <title>Re: binary files in c/c++</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/376682/379994/ReadMessage.aspx#379994</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/CandCPP/376682/379994/ReadMessage.aspx#379994"&gt;Re: binary files in c/c++&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/CandCPP/Board.aspx"&gt;C and C++&lt;/a&gt; forum.&lt;/p&gt;&lt;br /&gt;
: This is very true and the reason why you should avoid C/C++ "bit &lt;br /&gt;
: fields" like the plauge. If you use the bitwise instructions &lt;br /&gt;
: instead, you usually shouldn't need to worry about how the bits are &lt;br /&gt;
: stored in memory: the compiler will handle that for you. Some issues &lt;br /&gt;
: may rise when you port code from a little endian CPU to a big endian &lt;br /&gt;
: one, but in most cases you don't have to worry about this, as long &lt;br /&gt;
: as you use the C/C++ bitwise operators. If you use bit fields, you &lt;br /&gt;
: unleash hell.&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
okay, so i have to stay clear of the bits...hmm...now there is one more doubt; we know that &lt;strong&gt;huffman encoding&lt;/strong&gt; assigns variable length codes to symbols...ie, &lt;strong&gt;not all symbols have an 8-bit code&lt;/strong&gt;.now, if all symbols are still written as a byte to the file, &lt;strong&gt;how is compression achieved???&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
thanks in advance..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/376682/379994/ReadMessage.aspx#379994</guid>
      <pubDate>Sat, 11 Oct 2008 21:18:52 -0700</pubDate>
    </item>
    <item>
      <title>Re: binary files in c/c++</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/376682/376684/ReadMessage.aspx#376684</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/CandCPP/376682/376684/ReadMessage.aspx#376684"&gt;Re: binary files in c/c++&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/CandCPP/Board.aspx"&gt;C and C++&lt;/a&gt; forum.&lt;/p&gt;: : hi! i need a solution to this problem concerning writing binary data &lt;br /&gt;
: : to files. that is, i would like to know how to write individual bits &lt;br /&gt;
: : into a file, without them being written as individual characters.....&lt;br /&gt;
: : &lt;br /&gt;
: : for eg, if we write the following array into a file :-&lt;br /&gt;
: : &lt;br /&gt;
: : char * str = "10010101101010110101";&lt;br /&gt;
: : &lt;br /&gt;
: : it will be a 20 &lt;strong&gt;byte &lt;/strong&gt;file. but i need to write those as bits, &lt;br /&gt;
: : so that the file would be a 20 &lt;strong&gt;bit &lt;/strong&gt;file.....ie, 2 and a half &lt;br /&gt;
: : bytes......&lt;br /&gt;
: : any suggestions??&lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
: Use strtol with base 2 to convert a binary string to a long integer. &lt;br /&gt;
: Then you can cast it to a char (or whatever datatype/size you want) &lt;br /&gt;
: and write it to the file at the correct position.&lt;br /&gt;
: Best Regards,&lt;br /&gt;
: Richard&lt;br /&gt;
: &lt;br /&gt;
: The way I see it... Well, it's all pretty blurry&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
thanks for your suggestion... you mean, first converting the number using strtol from binary to decimal? hmm....might be...i'll try that, but is there any function which will allow me to write individual bits ?&lt;br /&gt;
thanks in advance&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/376682/376684/ReadMessage.aspx#376684</guid>
      <pubDate>Wed, 01 Oct 2008 12:43:48 -0700</pubDate>
    </item>
    <item>
      <title>binary files in c/c++</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/376682/376682/ReadMessage.aspx#376682</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/CandCPP/376682/376682/ReadMessage.aspx#376682"&gt;binary files in c/c++&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/CandCPP/Board.aspx"&gt;C and C++&lt;/a&gt; forum.&lt;/p&gt;hi! i need a solution to this problem concerning writing binary data to files. that is, i would like to know how to write individual bits into a file, without them being written as individual characters.....&lt;br /&gt;
&lt;br /&gt;
for eg, if we write the following array into a file :-&lt;br /&gt;
&lt;br /&gt;
char * str = "10010101101010110101";&lt;br /&gt;
&lt;br /&gt;
it will be a 20 &lt;strong&gt;byte &lt;/strong&gt;file. but i need to write those as bits, so that the file would be a 20 &lt;strong&gt;bit &lt;/strong&gt;file.....ie, 2 and a half bytes......&lt;br /&gt;
any suggestions??&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/376682/376682/ReadMessage.aspx#376682</guid>
      <pubDate>Wed, 01 Oct 2008 12:31:10 -0700</pubDate>
    </item>
    <item>
      <title>Re: can you check it?-about function</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/376184/376193/ReadMessage.aspx#376193</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/beginnercpp/376184/376193/ReadMessage.aspx#376193"&gt;Re: can you check it?-about function&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/beginnercpp/Board.aspx"&gt;Beginner C/C++&lt;/a&gt; forum.&lt;/p&gt;i dont see any syntax errors in this code. can't say there is logical error either. printing a in place of m cannot be counted as a logical error, it is the temperature that you are printing. still, m is unused. &lt;br /&gt;
&lt;br /&gt;
i also agree that the formatting could have been better. some spacing can do a lot good.&lt;br /&gt;
cheers!&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/376184/376193/ReadMessage.aspx#376193</guid>
      <pubDate>Sun, 28 Sep 2008 09:13:12 -0700</pubDate>
    </item>
  </channel>
</rss>