<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>C and C++ Forum RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest threads from the 'C and C++' forum at Programmer's Heaven, excluding replies.</description>
    <language>en</language>
    <copyright>Copyright 2010 Programmers Heaven</copyright>
    <pubDate>Thu, 18 Mar 2010 07:42:39 -0700</pubDate>
    <lastBuildDate>Thu, 18 Mar 2010 07:42:39 -0700</lastBuildDate>
    <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>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Convert String to Integer in C</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/414665/414665/convert-string-to-integer-in-c/</link>
      <description>How is it that a string, or part of a string, can be converted to an integer variable? For example, the user is asked to input a date and they input 12/31/2000, which is saved as a string. How could the "12" the "31" and the "2000" each be isolated and moved into an integer variable? &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/414665/414665/convert-string-to-integer-in-c/</guid>
      <pubDate>Wed, 17 Mar 2010 22:10:41 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Easter Sales:Apple Iphone 3Gs 32GB---$210</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/414656/414656/easter-salesapple-iphone-3gs-32gb---210/</link>
      <description>COMPANY'S NAME:DURN STORE ELECTRONIC TECHNOLOGIES LTD.(U.S.)&lt;br /&gt;
Registration#:03876296&lt;br /&gt;
Sales Manager:James Gardner&lt;br /&gt;
Email us at: durn_storetechnologies@live.com&lt;br /&gt;
Email us at: durn_storetechnologies@live.com&lt;br /&gt;
&lt;br /&gt;
Tel: +12512020656&lt;br /&gt;
Tell: 2512020656&lt;br /&gt;
&lt;br /&gt;
Website: &lt;a href="http://www.durnstoretech.tk"&gt;http://www.durnstoretech.tk&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
We are wholesalers of electronic products company in United States. We sell mainly electronics products. Such as iphones, mobile phones, Video Games Console, laptops etc.we dropship to our customers everywhere in the world and also we will like our customers to know that we are always at their services,feel free to contact us and you obtain more information about our company and also our services.&lt;br /&gt;
&lt;br /&gt;
Most of our phones are manufactured and imported from Finland,Hungary and Singapore; they are factory sealed with original packets with complete accessory, e.g. charger, extra battery and software c d. The phones are sim free and it's never lock to any network, specification: (europeans/usa-specifications) general network gsm 900/gsm 1800/gsm 1900 platform - tri band (gsm900 + 1800 + 1900 MHz: country of manufactured origin: Finland,Hungary and Singapore.&lt;br /&gt;
&lt;br /&gt;
1. Complete accessories(Well packed and sealed in original company box)&lt;br /&gt;
2. Unlocked / sim free.&lt;br /&gt;
3. Brand new (original manufacturer) box - no copies&lt;br /&gt;
4. All phones have English language as default&lt;br /&gt;
5. All material (software, manual) - car chargers - home chargers - usb data cables -holsters/belt clips - wireless headsets(bluetooth) -leather and non-leather carrying cases - batteries.&lt;br /&gt;
&lt;br /&gt;
If you are interested, forward your questions and inquires to us via email your order and shipping details. we give 1 year warranty for every product sold out to our costumers, our product are company class 1 tested and approved by global standard organization of wireless industries, Brand new merchandise with complete accessories, extra charger and battery.&lt;br /&gt;
&lt;br /&gt;
All items are all brand new direct from the manufacturers in English &amp;amp; Spanish manual, Finland made. we do our shipping worldwide viaCourier Service to your doorstep location next day delivery and the shipping confirmation shall be sent to you upon acknowledgment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Contact us via E-mail : durn_storetechnologies@live.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CHECK OUT FOR OUR EXTRA CHEAPER PRODUCT LIST:&lt;br /&gt;
&lt;br /&gt;
Apple iPhone:&lt;br /&gt;
Apple iPhone:&lt;br /&gt;
Apple iPhone 3GS 32GB- $210&lt;br /&gt;
Apple iPhone 3GS 16GB- $200&lt;br /&gt;
Apple iPhone 4GB — $100&lt;br /&gt;
Apple iPhone 8GB — $120&lt;br /&gt;
Apple iPhone 16GB — $130&lt;br /&gt;
Apple iPhone 3G 8GB — $140&lt;br /&gt;
Apple iPhone 3G 16GB — $150&lt;br /&gt;
&lt;br /&gt;
Apple I Touch 32gb-----$150&lt;br /&gt;
&lt;br /&gt;
Android G1---------$200&lt;br /&gt;
&lt;br /&gt;
Palm Pre Sprint —$220&lt;br /&gt;
&lt;br /&gt;
BlackBerry:&lt;br /&gt;
BlackBerry Storm2 9550 Black Unlocked------$200&lt;br /&gt;
Blackberry Curve 8900 — $170&lt;br /&gt;
Blackberry Storm 9500 — $140&lt;br /&gt;
Blackberry Storm 9530 — $155&lt;br /&gt;
Blackberry Pearl Flip 8220 — $105&lt;br /&gt;
Blackberry Bold 9000 — $135&lt;br /&gt;
Blackberry Curve 8320 — $125&lt;br /&gt;
&lt;br /&gt;
HTC Phones:-&lt;br /&gt;
HTC Google Nexus One = $284&lt;br /&gt;
HTC HD2 T8585 = $264&lt;br /&gt;
HTC Pure = $204&lt;br /&gt;
HTC Tattoo A3288 = $190&lt;br /&gt;
HTC Touch2 T3333 = $210&lt;br /&gt;
HTC Hero Android A6262 = $239&lt;br /&gt;
HTC Ozone = $189&lt;br /&gt;
HTC Snap S521 = $199&lt;br /&gt;
HTC Magic = $219&lt;br /&gt;
HTC Tilt2 = $257&lt;br /&gt;
HTC Touch Pro2 T7373 = $254&lt;br /&gt;
HTC Imagio = $288&lt;br /&gt;
HTC Touch Diamond2 = $229&lt;br /&gt;
HTC Dream = $192&lt;br /&gt;
HTC Touch Cruise 09 = $224&lt;br /&gt;
HTC MAX 4G = $374&lt;br /&gt;
HTC Touch HD T8282 = $231&lt;br /&gt;
HTC Touch 3G T3232 = $159&lt;br /&gt;
HTC S740 = $217&lt;br /&gt;
&lt;br /&gt;
Eten:&lt;br /&gt;
Eten glofiish X610 — $135&lt;br /&gt;
Eten glofiish V900 — $235&lt;br /&gt;
Eten glofiish X900 — $185&lt;br /&gt;
Acer Tempo DX900 ----$190&lt;br /&gt;
Eten glofiish DX900 — $165&lt;br /&gt;
Eten glofiish M810 — $155&lt;br /&gt;
Eten glofiish X650 — $145&lt;br /&gt;
Eten glofiish M800 — $160&lt;br /&gt;
&lt;br /&gt;
Nokia:&lt;br /&gt;
Nokia N98—–$200&lt;br /&gt;
Nokia N85——$190&lt;br /&gt;
Nokia N96 16GB– $175&lt;br /&gt;
Nokia E90 — $155&lt;br /&gt;
Nokia N97 — $195&lt;br /&gt;
Nokia N79 — $175&lt;br /&gt;
Nokia E72 — $190&lt;br /&gt;
Nokia E71 — $180&lt;br /&gt;
Nokia E75 - $185&lt;br /&gt;
Nokia 8800 Sapphire Arte — $205&lt;br /&gt;
Nokia N93i — $125&lt;br /&gt;
Nokia 8600 Luna — $145&lt;br /&gt;
Nokia 5530 XpressMusic --$190&lt;br /&gt;
Nokia 5800 XPress Music—-$185&lt;br /&gt;
Nokia 5330 Mobile TV Edition@-$124&lt;br /&gt;
Nokia X6-$284&lt;br /&gt;
Nokia N900- $254&lt;br /&gt;
Nokia 5800 Navigation Edition- $157&lt;br /&gt;
Nokia 6760 slide -$155&lt;br /&gt;
Nokia 6790 Surge -$179&lt;br /&gt;
&lt;br /&gt;
Sony Ericsson:&lt;br /&gt;
Sony Ericsson XPERIA Pureness- $284&lt;br /&gt;
Sony Ericsson Idou—–$190&lt;br /&gt;
Sony Ericsson C510 — $185&lt;br /&gt;
Sony Ericsson P1 — $125&lt;br /&gt;
Sony Ericsson C905 — $145&lt;br /&gt;
Sony Ericsson W960 — $130&lt;br /&gt;
Sony Ericsson G900 — $150&lt;br /&gt;
Sony Ericsson XPERIA X1 — $175&lt;br /&gt;
Sony Ericsson C902 — $130&lt;br /&gt;
Sony Ericsson W902 — $145&lt;br /&gt;
&lt;br /&gt;
Samsung:&lt;br /&gt;
Samsung C6112 = $150&lt;br /&gt;
Samsung M5650 Lindy = $174&lt;br /&gt;
Samsung B5722 = $193&lt;br /&gt;
Samsung I5700 Galaxy Spica = $239&lt;br /&gt;
Samsung I8000 Omnia II —— $220&lt;br /&gt;
Samsung B7320 OmniaPRO —— $200&lt;br /&gt;
Samsung B7300 Omnia LITE——$190&lt;br /&gt;
Samsung i8910 Omnia HD ——-$170&lt;br /&gt;
Samsung i900 Omnia 16GB — $165&lt;br /&gt;
Samsung Omnia 8GB ——-$160&lt;br /&gt;
Samsung S8000 Jet ————&lt;br /&gt;
Samsung T929 Memoir — $195&lt;br /&gt;
Samsung T919 Behold — $185&lt;br /&gt;
Samsung Giorgio Armani P520 — $135&lt;br /&gt;
Samsung U900 Soul — $160&lt;br /&gt;
Samsung G800 — $155&lt;br /&gt;
Samsung F490 — $145&lt;br /&gt;
&lt;br /&gt;
LG Phones&lt;br /&gt;
LG GW820 eXpo = $264&lt;br /&gt;
LG GW620 = $204&lt;br /&gt;
LG BL40 New Chocolate = $224&lt;br /&gt;
LG GW550—— $205&lt;br /&gt;
LG Incite——$200&lt;br /&gt;
LG GD910—–$195&lt;br /&gt;
LG KS500—-$190&lt;br /&gt;
LG KF900 Prada—–$195&lt;br /&gt;
LG KC780—-$200&lt;br /&gt;
LG KP500 Cookie—–$215&lt;br /&gt;
LG KC910 Renoir——$210&lt;br /&gt;
LG KB770——$200&lt;br /&gt;
LG CB630 Invision——$200&lt;br /&gt;
LG KS360——-$190&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Motorola Phones:-&lt;br /&gt;
Motorola BACKFLIP = $249&lt;br /&gt;
Motorola XT800 = $199&lt;br /&gt;
Motorola XT701 = $199&lt;br /&gt;
Motorola MILESTONE = $289&lt;br /&gt;
Motorola DEXT MB220 = $199&lt;br /&gt;
Motorola MC55 = $583&lt;br /&gt;
&lt;br /&gt;
Video Games Console:&lt;br /&gt;
Playstation:&lt;br /&gt;
Sony PSP Slim Giga Bundle — $105&lt;br /&gt;
Sony PlayStation 3 80GB Motorstorm Pack — $155&lt;br /&gt;
Sony Playstation 3 60GB — $140&lt;br /&gt;
Sony PlayStation 3 40GB — $125&lt;br /&gt;
&lt;br /&gt;
Microsoft Xbox:&lt;br /&gt;
Xbox 360 Arcade Console — $115&lt;br /&gt;
Xbox 360 Pro 60GB Console — $145&lt;br /&gt;
Xbox 360 Elite 120GB Console — $165&lt;br /&gt;
&lt;br /&gt;
Nintendo:&lt;br /&gt;
Nintendo DS Lite — $70&lt;br /&gt;
Nintendo Wii Console — $125&lt;br /&gt;
&lt;br /&gt;
Playstation PSPgo System- Black (98513)------------------$170&lt;br /&gt;
Sony PSP Core System (Piano Black) (Slim Model with AV Video Out Port)---$125&lt;br /&gt;
Sony PSP-3000 Limited Edition Rock Band Unplugged ----------$180&lt;br /&gt;
Playstation PSP 3000 Core System (98898)----------------------$140&lt;br /&gt;
Playstation PSP LE Rock Band Pack (98903)----------------------$155&lt;br /&gt;
Sony PSP-3000 Core Pack System (Piano Black)------------------$125&lt;br /&gt;
Sony PSP-N1000 PSPgo Portable Gaming Console - Pearl White---$175&lt;br /&gt;
Sony PSPgo (Piano Black)-------------------------------------------$185&lt;br /&gt;
Sony Psp Model 1001 - Handheld Game System - Black-------------$100&lt;br /&gt;
PSP 3000 Gaming Console System----------------------------------$139&lt;br /&gt;
PSP Slim PSP to TV Component Video Cables for PSP Model 2000----$90&lt;br /&gt;
&lt;br /&gt;
APPLE IPODS:&lt;br /&gt;
Apple iPod 60GB (Video) New – $150usd&lt;br /&gt;
Apple iPod 30GB (Video) New – $140usd&lt;br /&gt;
Apple ipod 80 GB – $140usd&lt;br /&gt;
Apple iPod U2 SE 20 GB – $120usd&lt;br /&gt;
Apple iPod Photo 60 GB – $120usd&lt;br /&gt;
Apple iPod Mini 6 GB – $100usd&lt;br /&gt;
Apple iPod 20 GB – $100usd&lt;br /&gt;
Apple iPod Photo 30 GB – $110usd&lt;br /&gt;
Apple iPod Nano 4GB New! – $90usd&lt;br /&gt;
Apple iPod Nano 2GB New! – $80usd&lt;br /&gt;
Apple iPod Shuffle 1 GB – $80usd&lt;br /&gt;
Apple iPod Mini 4 GB – $70usd&lt;br /&gt;
Apple iPod Shuffle 512 MB – $60usd&lt;br /&gt;
&lt;br /&gt;
APPLE LAPTOPS&lt;br /&gt;
Apple Macbook Air……………………….$600&lt;br /&gt;
Apple MacBook (MA700LL/A) Mac Notebook…$500usd&lt;br /&gt;
Apple MacBook Pro (MA611LL/A) Notebook…$500usd&lt;br /&gt;
Apple MacBook (MA254LL/A) Mac Notebook…$450usd&lt;br /&gt;
Apple iBook G3 (M7698LL/A) Mac Notebook..$400usd&lt;br /&gt;
Apple MacBook Pro (MA609LL/A) Notebook…$550usd&lt;br /&gt;
Apple MacBook Pro (MA600LLA) Notebook…$500usd&lt;br /&gt;
Apple MacBook Pro (MA610LL/A) Notebook…$450usd&lt;br /&gt;
Apple Macbook Pro (885909119400) Notebook..$445usd&lt;br /&gt;
&lt;br /&gt;
Xun Chi 138(world smallest phone)-----------------@130&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Pioneer PDP 6010FD Plasm TV $1000&lt;br /&gt;
Pioneer PDP 5080HD Plasm TV $500&lt;br /&gt;
Pioneer PDP 5010FD Plasm TV $600&lt;br /&gt;
&lt;br /&gt;
Sony KLV32S200A-LCD TV $400&lt;br /&gt;
SONY - PLASMA DISPLAYS GXDL52H1 52IN FULL HD$1000&lt;br /&gt;
Sony KDL-32M4000 32-inch LCD TV $400&lt;br /&gt;
&lt;br /&gt;
Samsung 42 inch Plasma TV PS42A410C1 $500&lt;br /&gt;
Samsung PPM63M7FB 63in Plasma Display $1000&lt;br /&gt;
Samsung 42" ED Plasma TV w/ Tuner (PPM42M5H) $900&lt;br /&gt;
&lt;br /&gt;
Panasonic TH-37PHD8UK Plasma $350&lt;br /&gt;
Panasonic TH-42PWD8UK Plasma $600&lt;br /&gt;
Panasonic TH-42PHD8UK Plasma $500&lt;br /&gt;
&lt;br /&gt;
SONY FWD-42PV1 Plasma Display $500&lt;br /&gt;
Sony PFM-42X1 Plasma Display $550&lt;br /&gt;
Sony FWD-50PX2 Plasma Display $700&lt;br /&gt;
&lt;br /&gt;
Philips 42PF7320A/37 Plasma TV $600&lt;br /&gt;
Philips 42PF9630A/37 Plasma HDTV $700&lt;br /&gt;
Philips 50PF7320A/37 Plasma HDTV $720&lt;br /&gt;
&lt;br /&gt;
SAMSUNG HPP3761 Plasma TV $610&lt;br /&gt;
Samsung PPM42M5S Plasma Display $505&lt;br /&gt;
&lt;br /&gt;
And many more.....................&lt;br /&gt;
&lt;br /&gt;
We ship our goods within 24/48 hours via FEDEX/DHL/UPS to your doorstep after confirmation of payment,upon which we issue you (TRACKING NUMBER/AIRWAYBILL)to enable you trace/track your goods before it get to your doorstep.&lt;br /&gt;
&lt;br /&gt;
Company Name: DURN STORE ELECTRONIC TECHS (U.S.)&lt;br /&gt;
Sales Manager: James Gardner&lt;br /&gt;
Email us at:durn_storetechnologies@live.com&lt;br /&gt;
Email us at: durn_storetechnologies@live.com&lt;br /&gt;
&lt;br /&gt;
Tel: +12512020656&lt;br /&gt;
Tell: 2512020656&lt;br /&gt;
&lt;br /&gt;
Website: &lt;a href="http://www.durnstoretech.tk"&gt;http://www.durnstoretech.tk&lt;/a&gt;&lt;br /&gt;
Email us at: durn_storetechnologies@live.com&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/414656/414656/easter-salesapple-iphone-3gs-32gb---210/</guid>
      <pubDate>Wed, 17 Mar 2010 16:05:03 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Function Pointer Menu in C</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/414585/414585/function-pointer-menu-in-c/</link>
      <description>I'm having a lot of trouble figuring out how to correctly use function pointers. Specifically in a text menu with an option of choosing a number, and then performing the selected function. I already have the functions written, but cannot get the menu system working. Could someone please show an example of how this is done? &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/414585/414585/function-pointer-menu-in-c/</guid>
      <pubDate>Mon, 15 Mar 2010 15:31:34 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Good book in C for Interview</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/414541/414541/good-book-in-c-for-interview/</link>
      <description>hi&lt;br /&gt;
&lt;br /&gt;
I need a good and effective book in C to face interview.&lt;br /&gt;
I read many books and online interview questions but every time in interview i used to get new questions. Can u suggest a best book which covers all core in details.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/414541/414541/good-book-in-c-for-interview/</guid>
      <pubDate>Sun, 14 Mar 2010 22:19:01 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Enter a menu</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/414502/414502/enter-a-menu/</link>
      <description>Hi there,&lt;br /&gt;
I'm an absoulte beginner in C programming and in a week I have a project to hand in, but not much time available as I have a ton of other projects due in less than 2 weeks. &lt;br /&gt;
I've only managed to work out how to create a program menu, but I cannot figure out how to enter an option and make it a menu in itself. &lt;br /&gt;
For example, I want to enter option 1.LIGHTS and from there I want to enter into the menu LIGHTS that will have another set of options (that I'll add later). Can anybody please help me figure out the codes for entering that chosen menu and also the option to take me out if it, back to the MAIN MENU? Thank you ever so much!&lt;br /&gt;
&lt;br /&gt;
This is what I worked out by now:&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include "stdafx.h"&lt;br /&gt;
&lt;br /&gt;
int _tmain(int argc, _TCHAR* argv[])&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
	int iResponse = 0;					&lt;br /&gt;
printf("\n\tM A I N  M E N U\n");&lt;br /&gt;
printf("\n1\tLIGHTS\n");&lt;br /&gt;
printf("2\tGAS CONSUMPTION\n");&lt;br /&gt;
printf("3\tBLINDS\n");&lt;br /&gt;
printf("4\tSECURITY SYSTEM\n");&lt;br /&gt;
printf("5\tTEMPERATURE\n");&lt;br /&gt;
&lt;br /&gt;
printf("\nPlease enter your selection: ");&lt;br /&gt;
scanf("%d", &amp;amp;iResponse);&lt;br /&gt;
&lt;br /&gt;
if (iResponse == 1)&lt;br /&gt;
  printf("\nL I G H T S\n");			&lt;br /&gt;
 &lt;br /&gt;
if (iResponse == 2)&lt;br /&gt;
  printf("\nG A S  C O N S U M P T I O N\n");&lt;br /&gt;
&lt;br /&gt;
if (iResponse == 3)&lt;br /&gt;
  printf("\nB L I N D S\n");&lt;br /&gt;
&lt;br /&gt;
if (iResponse == 4)&lt;br /&gt;
  printf("\nS E C U R I T Y  S Y S T E M\n");&lt;br /&gt;
&lt;br /&gt;
if (iResponse == 5)&lt;br /&gt;
  printf("\nT E M P E R A T U R E\n");&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/414502/414502/enter-a-menu/</guid>
      <pubDate>Sat, 13 Mar 2010 09:30:06 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>What is the point of this?</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/414443/414443/what-is-the-point-of-this/</link>
      <description>I found this assignment operation that looked cryptic so I wrote a test program around it.  I still can't figure out what the point is however it seems to just reassign the same value to the variable.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: Red;"&gt;len = (len +3) &amp;amp; ~3;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
len is an unsigned int which is usually passed in from a sizeof operation.  I had originally thought this was a pointer manipulation thing but that hasn't panned out.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/414443/414443/what-is-the-point-of-this/</guid>
      <pubDate>Thu, 11 Mar 2010 10:18:19 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Need Help With Simple Program</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/414379/414379/need-help-with-simple-program/</link>
      <description>Trying to make a program that:&lt;br /&gt;
-Has random numbers using SRAND&lt;br /&gt;
-For the seed use Time&lt;br /&gt;
-Has to load two single deminsion arrays that are 25 elements each&lt;br /&gt;
-Sort one array using bubble sort and the other using selection sort&lt;br /&gt;
-Find mean and median using one array&lt;br /&gt;
-Use the other array to determine the standard deviation&lt;br /&gt;
&lt;br /&gt;
I'm confused and having trouble doing this. Any Help would be great&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/414379/414379/need-help-with-simple-program/</guid>
      <pubDate>Tue, 09 Mar 2010 21:04:04 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>This post has been deleted.</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/414378/414378/this-post-has-been-deleted/</link>
      <description>This post has been deleted.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/414378/414378/this-post-has-been-deleted/</guid>
      <pubDate>Tue, 09 Mar 2010 21:02:13 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>C programming video tutorial</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/414278/414278/c-programming-video-tutorial/</link>
      <description>Some c programming video tutorial for beginners. I have watched half of them it looks very good.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.engineerforum.net/cprogramming/c1.html"&gt;http://www.engineerforum.net/cprogramming/c1.html&lt;/a&gt; &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/414278/414278/c-programming-video-tutorial/</guid>
      <pubDate>Sun, 07 Mar 2010 13:21:16 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Array copying problem</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/414195/414195/array-copying-problem/</link>
      <description>Hi I am trying to copy one struct to another, but I am making some minor mistake that it is not getting copied. Can someone help me fix it?&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;

#include&amp;lt;stdio.h&amp;gt;
#include&amp;lt;stdlib.h&amp;gt;
typedef struct
{
    int inst_addr;
}instruction;

void copy_struct(instruction src,instruction dest)
{
    dest.inst_addr = src.inst_addr;
}

int main()
{
    int addr = 1000;
    instruction check1;
    instruction check2;
    check1.inst_addr = 10;
    check2.inst_addr = 50;   
    copy_struct(check1,check2);
    printf("%d",check2.inst_addr);
}        

&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/414195/414195/array-copying-problem/</guid>
      <pubDate>Wed, 03 Mar 2010 23:36:52 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Square and Hollow Square in C</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/414186/414186/square-and-hollow-square-in-c/</link>
      <description>Question about this C program that I've written. The objective is to print a square and a hollow square to the size input by the user. I've got the solid square down fine, but I'm having a bit of trouble with the hollow one. I understand that something must be put in between the two loops, but I'm having difficulty finding the solution. Any suggestions for this source code? Thanks a lot ... &lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main( void )  &lt;br /&gt;
{&lt;br /&gt;
  int row;&lt;br /&gt;
  int col;&lt;br /&gt;
  int num;&lt;br /&gt;
&lt;br /&gt;
  printf( "Please Enter a Number Between 1 and 20: ")&lt;br /&gt;
  scanf( "%d", &amp;amp;num );&lt;br /&gt;
  printf( "\n" );&lt;br /&gt;
&lt;br /&gt;
  for(row = 0; row &amp;lt; num; row++)&lt;br /&gt;
  {&lt;br /&gt;
    for(col = 0; col &amp;lt; num; col++)&lt;br /&gt;
    {&lt;br /&gt;
      printf("*");&lt;br /&gt;
    }&lt;br /&gt;
    printf("\n");&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/414186/414186/square-and-hollow-square-in-c/</guid>
      <pubDate>Wed, 03 Mar 2010 17:42:21 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Square and Hollow Square in C</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/414184/414184/square-and-hollow-square-in-c/</link>
      <description>Question about this C program that I've written. The objective is to print a square and a hollow square to the size input by the user. I've got the solid square down fine, but I'm having a bit of trouble with the hollow one. I understand that something must be put in between the two loops, but I'm having difficulty finding the solution. Any suggestions for this source code? Thanks a lot ... &lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main( void )  &lt;br /&gt;
{&lt;br /&gt;
  int row;&lt;br /&gt;
  int col;&lt;br /&gt;
  int num;&lt;br /&gt;
&lt;br /&gt;
  printf( "Please Enter a Number Between 1 and 20: ")&lt;br /&gt;
  scanf( "%d", &amp;amp;num );&lt;br /&gt;
  printf( "\n" );&lt;br /&gt;
&lt;br /&gt;
  for(row = 0; row &amp;lt; num; row++)&lt;br /&gt;
  {&lt;br /&gt;
    for(col = 0; col &amp;lt; num; col++)&lt;br /&gt;
    {&lt;br /&gt;
      printf("*");&lt;br /&gt;
    }&lt;br /&gt;
    printf("\n");&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/414184/414184/square-and-hollow-square-in-c/</guid>
      <pubDate>Wed, 03 Mar 2010 17:39:31 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Liinux + C++</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/414030/414030/liinux-+-c++/</link>
      <description>Is there any shorter way to make a tar ball on linux when you have maybe a 100 dependencies&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/414030/414030/liinux-+-c++/</guid>
      <pubDate>Mon, 01 Mar 2010 03:09:28 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>how to compute time in and time out using looping</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/413990/413990/how-to-compute-time-in-and-time-out-using-looping/</link>
      <description>helo im first year student i want to ask you how to compute the time in and time out using the looping in c++ the format of time is military hour.. i hope you will help me thank you a lot...&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/413990/413990/how-to-compute-time-in-and-time-out-using-looping/</guid>
      <pubDate>Sat, 27 Feb 2010 22:44:35 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>What wrong in this program??</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/413981/413981/what-wrong-in-this-program/</link>
      <description>This is a simple program of a password matching..&lt;br /&gt;
I am not gettingthe desired output of this program...&lt;br /&gt;
Please help me out...&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=1640"&gt;matching.cpp&lt;/a&gt; (337 bytes | downloaded 60 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/413981/413981/what-wrong-in-this-program/</guid>
      <pubDate>Sat, 27 Feb 2010 11:53:38 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>C++ Service in windows</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/413978/413978/c++-service-in-windows/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I need to write a program that can work as a service in windows XP.&lt;br /&gt;
It checks every minute if a process called 'myprocess.exe' is running.&lt;br /&gt;
If the process is not running, the service should start the process.&lt;br /&gt;
&lt;br /&gt;
I can program this in VB6, but unfortunately, VB6 programs are not suitable for working as a service.&lt;br /&gt;
&lt;br /&gt;
Can someone help me on the way please?&lt;br /&gt;
&lt;br /&gt;
Thanks in advance,&lt;br /&gt;
&lt;br /&gt;
fingerprince &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/413978/413978/c++-service-in-windows/</guid>
      <pubDate>Sat, 27 Feb 2010 10:09:14 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>hi all, I dont have any clue how to accomplish this. Pls provide ne cl</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/413958/413958/hi-all-i-dont-have-any-clue-how-to-accomplish-this-pls-provide-ne-cl/</link>
      <description>hello everybody,&lt;br /&gt;
&lt;br /&gt;
I have one project due on this sunday....please help me with this.....any clues hints would be highly appreciated.....thanks a ton&lt;br /&gt;
&lt;br /&gt;
This project will require you to develop three C functions:&lt;br /&gt;
&lt;br /&gt;
float nandFloatMul(float a, float B) float nandFloatAdd(float a, float B) float nandFloatSub(float a, float B)&lt;br /&gt;
&lt;br /&gt;
Each of the above functions takes as input two float operands and returns their product, sum, and difference, respectively, as a float.&lt;br /&gt;
&lt;br /&gt;
You must also implement the following “helper” functions:&lt;br /&gt;
int boolNand(int i, int j)&lt;br /&gt;
int bitWiseNand(int i, int j)&lt;br /&gt;
&lt;br /&gt;
Notes: 1. boolNand() returns zero if and only if both inputs are not zero. 2. bitWiseNand() returns the bit-wise nand of the inputs. 3. You may implement versions of boolNand() and bitWiseNand() in any,&lt;br /&gt;
&lt;br /&gt;
or all, integral C data types. Requirements:&lt;br /&gt;
1. In implementing your nandFloat*() functions, you may only use: (a) boolNand(), (B) bitWiseNand(), © the C assignment (=) operator, and (d) the C shifting operators (&amp;lt;&amp;lt; and &amp;gt;&amp;gt;). &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/413958/413958/hi-all-i-dont-have-any-clue-how-to-accomplish-this-pls-provide-ne-cl/</guid>
      <pubDate>Fri, 26 Feb 2010 13:26:28 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Serial port programming using c in Win XP OS platform</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/413935/413935/serial-port-programming-using-c-in-win-xp-os-platform/</link>
      <description>I am using ANSI style c code for creating a serial data front end with GUI for my embedded unit.&lt;br /&gt;
The code is developed from the standard ASCI C code for serial port programming.&lt;br /&gt;
/***********CODE**********************/&lt;br /&gt;
#include &amp;lt;dos.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;conio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define PORT1 0x3F8&lt;br /&gt;
&lt;br /&gt;
  /* Defines Serial Ports Base Address */&lt;br /&gt;
  /* COM1 0x3F8                        */&lt;br /&gt;
  /* COM2 0x2F8			       */&lt;br /&gt;
  /* COM3 0x3E8			       */&lt;br /&gt;
  /* COM4 0x2E8			       */&lt;br /&gt;
&lt;br /&gt;
void main(void)&lt;br /&gt;
{&lt;br /&gt;
 int c;&lt;br /&gt;
 int ch;&lt;br /&gt;
 outportb(PORT1 + 1 , 0);   /* Turn off interrupts - Port1 */&lt;br /&gt;
&lt;br /&gt;
 /*         PORT 1 - Communication Settings         */&lt;br /&gt;
&lt;br /&gt;
 outportb(PORT1 + 3 , 0x80);  /* SET DLAB ON */&lt;br /&gt;
 outportb(PORT1 + 0 , 0x03);  /* Set Baud rate - Divisor Latch Low Byte */&lt;br /&gt;
			      /* Default 0x03 =  38,400 BPS */&lt;br /&gt;
			      /*         0x01 = 115,200 BPS */&lt;br /&gt;
			      /*         0x02 =  57,600 BPS */&lt;br /&gt;
			      /*         0x06 =  19,200 BPS */&lt;br /&gt;
			      /*         0x0C =   9,600 BPS */&lt;br /&gt;
			      /*         0x18 =   4,800 BPS */&lt;br /&gt;
			      /*         0x30 =   2,400 BPS */&lt;br /&gt;
 outportb(PORT1 + 1 , 0x00);  /* Set Baud rate - Divisor Latch High Byte */&lt;br /&gt;
 outportb(PORT1 + 3 , 0x03);  /* 8 Bits, No Parity, 1 Stop Bit */&lt;br /&gt;
 outportb(PORT1 + 2 , 0xC7);  /* FIFO Control Register */&lt;br /&gt;
 outportb(PORT1 + 4 , 0x0B);  /* Turn on DTR, RTS, and OUT2 */&lt;br /&gt;
&lt;br /&gt;
 printf("\nSample Comm's Program. Press ESC to quit \n");&lt;br /&gt;
 &lt;br /&gt;
 do { c = inportb(PORT1 + 5);          /* Check to see if char has been */&lt;br /&gt;
                                       /* received.                     */&lt;br /&gt;
      if (c &amp;amp; 1) {ch = inportb(PORT1); /* If so, then get Char          */&lt;br /&gt;
                  printf("%c",ch);}    /* Print Char to Screen          */&lt;br /&gt;
&lt;br /&gt;
      if (kbhit()){ch = getch();         /* If key pressed, get Char */&lt;br /&gt;
                   outportb(PORT1, ch);} /* Send Char to Serial Port */&lt;br /&gt;
&lt;br /&gt;
    } while (ch !=27); /* Quit when ESC (ASC 27) is pressed */&lt;br /&gt;
}&lt;br /&gt;
In all standard text books(Eg:The window serial port programming By YING BAI) it is clearly mentioned that the code will not run in Win NT/2000/XP OS platforms.But I could run the c code in the Win XP OS, and it is working!!!But the problem is that after some time it pauses, until a mouse movement or key board hit is detected).I turned off the screen saver and power saving mode for display.The same code works perfectly with MSDOS /Win 95/98 OS platforms (that is standard)with out any problem.Can you give the explanation and remedy(if available)for this problem? With warm regards Arun.A.D&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/413935/413935/serial-port-programming-using-c-in-win-xp-os-platform/</guid>
      <pubDate>Thu, 25 Feb 2010 22:47:32 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Turbo C Quadratic Equation</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/413857/413857/turbo-c-quadratic-equation/</link>
      <description>Hi. Good Day.&lt;br /&gt;
&lt;br /&gt;
Is there anybody who can help me with my project in turbo C....&lt;br /&gt;
The logic must be like this, THE USER WILL INPUT A QUADRATIC EQUATION AND IT WILL BE DETERMINED IF THE EQUATION IS FACTORABLE OR NOT.&lt;br /&gt;
&lt;br /&gt;
THE OUTPUT MUST BE LIKE THIS:&lt;br /&gt;
IF FACTORABLE THEN&lt;br /&gt;
SOLVE THE EQUATION&lt;br /&gt;
PRINT THE ANSWER&lt;br /&gt;
ELSE THEN&lt;br /&gt;
PRINT "THE EQUATION IS NOT FACTORABLE"&lt;br /&gt;
&lt;br /&gt;
Any help...thanx a lot. &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/413857/413857/turbo-c-quadratic-equation/</guid>
      <pubDate>Wed, 24 Feb 2010 19:16:18 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Data Type in Programming</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/413825/413825/data-type-in-programming/</link>
      <description>Here I am sharing some of my early experiences in Programming. When we write code for any application, generally we concentrate on Business Logic and different features available to meet the Business Logic. Whatever applications we are working on, we are ultimately playing with data .The placeholder for the Data is the variables/fields/properties, etc. When we are declaring data type for a variable, generally we don’t give much emphasis at that point. Here some points we need to take care&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;http://www.mindfiresolutions.com/Data-Type-in-Programming-426.php&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/413825/413825/data-type-in-programming/</guid>
      <pubDate>Wed, 24 Feb 2010 03:45:17 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Pointer typecasting in Global scope..</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/413774/413774/pointer-typecasting-in-global-scope/</link>
      <description>Hi i need a small clarification for the below code. could anyone pls help me.&lt;br /&gt;
&lt;br /&gt;
1st case:&lt;br /&gt;
A void pointer and a int variable in local scope.&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; works fine.&lt;br /&gt;
&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
int a = 10;&lt;br /&gt;
void *ptr;&lt;br /&gt;
ptr = (void *)&amp;amp;a;&lt;br /&gt;
&lt;br /&gt;
printf("%d \n",*(int *)ptr);&lt;br /&gt;
_getch();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
2nd case:&lt;br /&gt;
A void pointer and a int variable in global scope.&lt;br /&gt;
&lt;br /&gt;
int a = 10;&lt;br /&gt;
void *ptr;&lt;br /&gt;
/*Error in below line -&amp;gt; 'int' differs in levels of indirection from 'void *'  */&lt;br /&gt;
ptr = (void *)&amp;amp;a; &lt;br /&gt;
&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
//printf("%d \n",*(int *)ptr);&lt;br /&gt;
_getch();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Could u pls tell me the reason, why am getting an error when doing pointer typecasting in a global scope.&lt;br /&gt;
&lt;br /&gt;
Compiler used : Visual studio 2005 &lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/413774/413774/pointer-typecasting-in-global-scope/</guid>
      <pubDate>Mon, 22 Feb 2010 22:50:28 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Capturing Mic input from sound card using directsound</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/413743/413743/capturing-mic-input-from-sound-card-using-directsound/</link>
      <description>Hallo,&lt;br /&gt;
&lt;br /&gt;
I am working on a project to develop a software defined radio.&lt;br /&gt;
I am an engineer with very limited programming experience.&lt;br /&gt;
My first step is to familiarise with directx, I wanted to write a program to capture sound coming in from the line input of the soundcard (Mic) using directsound and display it or even just save it to a file. I have got a few ideas online and few sample codes. Below is the code i have been working with but it doesnt seem to work.&lt;br /&gt;
&lt;br /&gt;
Kindly help&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ComponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using Microsoft.DirectX.DirectSound;&lt;br /&gt;
using Microsoft.DirectX;&lt;br /&gt;
using Buffer = Microsoft.DirectX.DirectSound.Buffer;&lt;br /&gt;
using System.IO;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.Runtime.InteropServices;&lt;br /&gt;
 &lt;br /&gt;
namespace ARAMC&lt;br /&gt;
{&lt;br /&gt;
    public partial class ATISRecordPanel : Form&lt;br /&gt;
    {&lt;br /&gt;
        string tempFile = "C:\\Program Files\\ARAMC\\Temp.WAV";&lt;br /&gt;
        private Capture MyCapture = new Capture();&lt;br /&gt;
        private CaptureBuffer MySndBuf;&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Sets a default format capture buffer with no effects; 22KHz 8bit/sample, mono&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        public ATISRecordPanel()&lt;br /&gt;
        {&lt;br /&gt;
            InitializeComponent();&lt;br /&gt;
            CaptureBufferDescription MySBufDesc = new CaptureBufferDescription();&lt;br /&gt;
            //setting the default wave capture format for use&lt;br /&gt;
            //by the buffer descriptor&lt;br /&gt;
            WaveFormat DefaultFormat = new WaveFormat();&lt;br /&gt;
            DefaultFormat.SamplesPerSecond = 22000; //default freq 22khz&lt;br /&gt;
            DefaultFormat.Channels = 1;&lt;br /&gt;
            DefaultFormat.BitsPerSample = 8;&lt;br /&gt;
            DefaultFormat.AverageBytesPerSecond = 22000;&lt;br /&gt;
            DefaultFormat.BlockAlign = 1;&lt;br /&gt;
 &lt;br /&gt;
            //setting the buffer descriptor to tell the capture buffer object how the&lt;br /&gt;
            //buffer should perform            &lt;br /&gt;
            MySBufDesc.Format = DefaultFormat;&lt;br /&gt;
            MySBufDesc.BufferBytes = 100000;&lt;br /&gt;
            MySBufDesc.ControlEffects = false;&lt;br /&gt;
            MySBufDesc.WaveMapped = true;&lt;br /&gt;
 &lt;br /&gt;
            MySndBuf = new CaptureBuffer(MySBufDesc, MyCapture);&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
         /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Constructor that sets format and buffersize, as well as enables &lt;br /&gt;
        /// echo cancellation and noise suppression effects&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        /// &amp;lt;param name="MyFormat"&amp;gt;&amp;lt;/param&amp;gt;&lt;br /&gt;
        /// &amp;lt;param name="bufsize"&amp;gt;&amp;lt;/param&amp;gt;&lt;br /&gt;
        &lt;br /&gt;
        public void SoundRec(WaveFormat MyFormat, int bufsize)&lt;br /&gt;
        {&lt;br /&gt;
            CaptureBufferDescription MySBufDesc = new CaptureBufferDescription();&lt;br /&gt;
            //Format has been defined in MainForm&lt;br /&gt;
            MySBufDesc.Format = MyFormat;&lt;br /&gt;
            MySBufDesc.BufferBytes = bufsize;&lt;br /&gt;
            MySBufDesc.ControlEffects = true;&lt;br /&gt;
            MySBufDesc.WaveMapped = true;&lt;br /&gt;
 &lt;br /&gt;
//            CaptureAcousticEchoCancellationEffect AECEffect;&lt;br /&gt;
//&lt;br /&gt;
//            MySBufDesc.CaptureEffectDescription = new CaptureEffectDescription[1];&lt;br /&gt;
//            MySBufDesc.CaptureEffectDescription[0].LocateInSof
tware = true;&lt;br /&gt;
//            MySBufDesc.CaptureEffectDescription[0].GuidEffects
Class = DSoundHelper.CaptureEffectsMsAcousticEchoCancellat
ion;&lt;br /&gt;
//            MySBufDesc.CaptureEffectDescription[0].GuidEffects
Instance = DSoundHelper.InterfaceCaptureEffectsAcousticEchoCa
ncellation;&lt;br /&gt;
//            MySBufDesc.CaptureEffectDescription[1].LocateInSof
tware = true;&lt;br /&gt;
//            MySBufDesc.CaptureEffectDescription[1].GuidEffects
Class = DSoundHelper.CaptureEffectsMsNoiseSuppression;&lt;br /&gt;
 &lt;br /&gt;
            try&lt;br /&gt;
            {&lt;br /&gt;
                //Create the CaptureBuffer&lt;br /&gt;
                MySndBuf = new CaptureBuffer(MySBufDesc,MyCapture);&lt;br /&gt;
            }&lt;br /&gt;
            catch (SoundException se)&lt;br /&gt;
            {&lt;br /&gt;
                MessageBox.Show(    "There is a " + se.ErrorString +&lt;br /&gt;
                                    " sound exception", "DirectSound Error");&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Starts the capture from the capture device&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        public void StartRecord()&lt;br /&gt;
        {&lt;br /&gt;
            MySndBuf.Start(true);&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Stops the recording of sound.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        public void StopRecord()&lt;br /&gt;
        {&lt;br /&gt;
            MySndBuf.Stop();&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Saves the data in the capture buffer into a wave file&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        public void ReadData()&lt;br /&gt;
        {&lt;br /&gt;
            int readposition, writeposition;&lt;br /&gt;
            ArrayList byteArrayList = new ArrayList();&lt;br /&gt;
            System.Text.ASCIIEncoding ascii = new System.Text.ASCIIEncoding();&lt;br /&gt;
 &lt;br /&gt;
            //Create a new wav file to store the capture buffer data.&lt;br /&gt;
            //if already exists will overwrite filename is test.wav&lt;br /&gt;
            string path =Application.StartupPath + "\\test.wav";&lt;br /&gt;
            Stream MemStream = new MemoryStream();&lt;br /&gt;
            MySndBuf.GetCurrentPosition(out writeposition, out readposition);&lt;br /&gt;
            MySndBuf.Read(0, MemStream, writeposition, LockFlag.None);&lt;br /&gt;
            Stream MyStream = new FileStream(tempFile, FileMode.Create);&lt;br /&gt;
            //begin to write the wave file header. for more details&lt;br /&gt;
            //Search google.com for "wave formats"&lt;br /&gt;
            //RIFF header&lt;br /&gt;
            try&lt;br /&gt;
            {&lt;br /&gt;
 &lt;br /&gt;
                byteArrayList.AddRange(ascii.GetBytes("RIFF"));&lt;br /&gt;
                byteArrayList.AddRange( ToBytes(36 + (int)MemStream.Length, 4));&lt;br /&gt;
                byteArrayList.AddRange(ascii.GetBytes("WAVE"));&lt;br /&gt;
                &lt;br /&gt;
                //fmt  chunk&lt;br /&gt;
                byteArrayList.AddRange(ascii.GetBytes("fmt "));&lt;br /&gt;
                //length of fmt chunk (never changes)&lt;br /&gt;
                byteArrayList.AddRange( ToBytes(16, 4));&lt;br /&gt;
                //"1" for pcm encoding&lt;br /&gt;
                byteArrayList.AddRange( ToBytes(1, 2));&lt;br /&gt;
                byteArrayList.AddRange( ToBytes(MySndBuf.Format.Channels, 2));&lt;br /&gt;
                byteArrayList.AddRange( ToBytes(MySndBuf.Format.SamplesPerSecond, 4));&lt;br /&gt;
                byteArrayList.AddRange( ToBytes(MySndBuf.Format.AverageBytesPerSecond, 4));&lt;br /&gt;
                byteArrayList.AddRange( ToBytes(MySndBuf.Format.BlockAlign, 2));&lt;br /&gt;
                byteArrayList.AddRange( ToBytes(MySndBuf.Format.BitsPerSample, 2));&lt;br /&gt;
 &lt;br /&gt;
                //the data chunk&lt;br /&gt;
                byteArrayList.AddRange(ascii.GetBytes("data"));&lt;br /&gt;
                byteArrayList.AddRange( ToBytes((int)MemStream.Length, 4));&lt;br /&gt;
                byte []buffer = new byte[MemStream.Length];&lt;br /&gt;
                MemStream.Read(buffer, 0, (int)MemStream.Length);&lt;br /&gt;
                byteArrayList.AddRange(buffer);&lt;br /&gt;
                buffer = new byte[byteArrayList.Count];&lt;br /&gt;
                byteArrayList.CopyTo(buffer);&lt;br /&gt;
                MyStream.Write(buffer, 0, buffer.Length);&lt;br /&gt;
            }&lt;br /&gt;
            catch(ArgumentException ae)&lt;br /&gt;
            {&lt;br /&gt;
                MessageBox.Show("Argument Exception with Message:\n\t" + ae.Message); &lt;br /&gt;
            }&lt;br /&gt;
            finally&lt;br /&gt;
            {&lt;br /&gt;
                MemStream.Close();&lt;br /&gt;
                MyStream.Close();&lt;br /&gt;
            }&lt;br /&gt;
 &lt;br /&gt;
                    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// returns capture status (boolean)&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;
        public bool Capturing()&lt;br /&gt;
        {&lt;br /&gt;
            return MySndBuf.Capturing;&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Recursive method that returns a target number in the form&lt;br /&gt;
        /// of an ArrayList of bytes with designated number of bytes. If not enough&lt;br /&gt;
        /// bytes to hold the targetnumber, will throw argumentexception.&lt;br /&gt;
        /// Should be used in a try-catch clause&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        /// &amp;lt;param name="targetnumber"&amp;gt;the value intended to convert&amp;lt;/param&amp;gt;&lt;br /&gt;
        /// &amp;lt;param name="numofbytes"&amp;gt;number of bytes needed&amp;lt;/param&amp;gt;&lt;br /&gt;
        /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;
        private ArrayList ToBytes(int targetnumber, short numofbytes)&lt;br /&gt;
        {&lt;br /&gt;
            int remainder, result;&lt;br /&gt;
            ArrayList returningarray;&lt;br /&gt;
 &lt;br /&gt;
            ArgumentException wrongnumofbytes =&lt;br /&gt;
                new ArgumentException("Not enough bytes to represent number",&lt;br /&gt;
                "numofbytes");&lt;br /&gt;
            result = Math.DivRem(targetnumber, 256, out remainder);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            //if not enough bytes specified to represent target number&lt;br /&gt;
            if (targetnumber &amp;gt;= Math.Pow(256, (double)numofbytes))&lt;br /&gt;
            {&lt;br /&gt;
                throw wrongnumofbytes;&lt;br /&gt;
            }&lt;br /&gt;
 &lt;br /&gt;
            //if there are higher significant hexadecima, run a recursion&lt;br /&gt;
            if (result &amp;gt;= 1)&lt;br /&gt;
            {&lt;br /&gt;
                returningarray = ToBytes(result, (short)(numofbytes - 1));&lt;br /&gt;
                returningarray.Insert(0, Convert.ToByte(remainder));&lt;br /&gt;
                return returningarray;&lt;br /&gt;
            }&lt;br /&gt;
 &lt;br /&gt;
            else //if (result &amp;lt; 1) recursion terminating condition&lt;br /&gt;
            {&lt;br /&gt;
                returningarray = new ArrayList(numofbytes);&lt;br /&gt;
                returningarray.Add(Convert.ToByte(targetnumber));&lt;br /&gt;
                for (int i = 0; i &amp;lt; numofbytes - 1; i++)&lt;br /&gt;
                {&lt;br /&gt;
                    returningarray.Add(Convert.ToByte(0));//fill up most significant hexadecima with 0's&lt;br /&gt;
                }&lt;br /&gt;
                return returningarray;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        public void RecordATIS(string ATIS)&lt;br /&gt;
        {&lt;br /&gt;
            textBox1.Text = ATIS;    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
        private void RecordButton_CheckedChanged(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            if (RecordButton.Checked == true)&lt;br /&gt;
            {&lt;br /&gt;
                StartRecord();&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {&lt;br /&gt;
                StopRecord();&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
        private void SaveButton_CheckedChanged(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            SaveButton.Checked = false;&lt;br /&gt;
            ReadData();&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
        private void ListenButton_CheckedChanged(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            if (ListenButton.Checked == true)&lt;br /&gt;
            {&lt;br /&gt;
                PlaySound(tempFile, IntPtr.Zero,&lt;br /&gt;
                    SoundFlags.SND_FILENAME | SoundFlags.SND_ASYNC);&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {&lt;br /&gt;
                PlaySound(null, IntPtr.Zero, SoundFlags.SND_PURGE);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
        [DllImport("winmm.dll", SetLastError = true,&lt;br /&gt;
                                CallingConvention = CallingConvention.Winapi)]&lt;br /&gt;
        static extern bool PlaySound(&lt;br /&gt;
            string pszSound,&lt;br /&gt;
            IntPtr hMod,&lt;br /&gt;
            SoundFlags sf);&lt;br /&gt;
 &lt;br /&gt;
        // Flags for playing sounds.  For this example, we are reading &lt;br /&gt;
 &lt;br /&gt;
        // the sound from a filename, so we need only specify &lt;br /&gt;
 &lt;br /&gt;
        // SND_FILENAME | SND_ASYNC&lt;br /&gt;
 &lt;br /&gt;
        [Flags]&lt;br /&gt;
 &lt;br /&gt;
        public enum SoundFlags : int&lt;br /&gt;
        {&lt;br /&gt;
            SND_SYNC = 0x0000,  // play synchronously (default) &lt;br /&gt;
 &lt;br /&gt;
            SND_ASYNC = 0x0001,  // play asynchronously &lt;br /&gt;
 &lt;br /&gt;
            SND_NODEFAULT = 0x0002,  // silence (!default) if sound not found &lt;br /&gt;
 &lt;br /&gt;
            SND_MEMORY = 0x0004,  // pszSound points to a memory file&lt;br /&gt;
 &lt;br /&gt;
            SND_LOOP = 0x0008,  // loop the sound until next sndPlaySound &lt;br /&gt;
 &lt;br /&gt;
            SND_NOSTOP = 0x0010,  // don't stop any currently playing sound &lt;br /&gt;
 &lt;br /&gt;
            SND_NOWAIT = 0x00002000, // don't wait if the driver is busy &lt;br /&gt;
 &lt;br /&gt;
            SND_ALIAS = 0x00010000, // name is a registry alias &lt;br /&gt;
 &lt;br /&gt;
            SND_ALIAS_ID = 0x00110000, // alias is a predefined ID&lt;br /&gt;
 &lt;br /&gt;
            SND_FILENAME = 0x00020000, // name is file name &lt;br /&gt;
 &lt;br /&gt;
            SND_RESOURCE = 0x00040004,  // name is resource name or atom &lt;br /&gt;
 &lt;br /&gt;
            SND_PURGE = 0x0040,&lt;br /&gt;
 &lt;br /&gt;
            SND_APPLICATION = 0x0080&lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/413743/413743/capturing-mic-input-from-sound-card-using-directsound/</guid>
      <pubDate>Mon, 22 Feb 2010 08:12:46 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Java into C++</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/413726/413726/java-into-c++/</link>
      <description>I am a crossed enrolled senior, last semester. At my main school, C++ is the required programming language, but at the crossed enrolled school it is Java. I am now stuck, can someone please help. I have a program due Tuesday, the assignment calls for a Java program, yet the professor stated I can submit it in C++, however, i do not know what the program is asking for really, because it is written for a Java course. Can someone please tell me that can help me, with this program, in either C++ or Java? See below....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Goal #1: The UI agent and FTP command generation The role of the UI agent is to provide a user interface that allows a human user to enter high-level requests and generate the appropriate FTP protocol commands to accomplish the user’s request. It also provides feedback to the user on the validity of user inputs and the success or failure of the request. Program #1: csci4311.ftp.UIAgent This program will read standard input to accept input lines that a human user can use to request simple FTP operations. Only three types of requests will be accepted from the user, a connect request (CONNECT), a get request (GET), and a quit request (QUIT). The specification of the input format for these requests, in our usual BNF-like notation is:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Program one will read standard input to accept input lines that represent user requests. For each line of input your program should:&lt;br /&gt;
 Echo the line of input (i.e., duplicate the line of input on standard output).&lt;br /&gt;
 For valid user requests, print on standard output the lines specified in the section “Processing for valid user requests” (below) for each of the three requests (CONNECT, GET, QUIT)&lt;br /&gt;
 For invalid user requests, print out the error message “ERROR -- &amp;lt;error-token&amp;gt;” where &amp;lt;errortoken&amp;gt;is the name of the token that is missing or ill-formed according to the above specification for user requests.&lt;br /&gt;
&lt;br /&gt;
A CONNECT request must be the first user input accepted by the program (the user may also input a new CONNECT request at any time). For each valid CONNECT request, the program will reset any internal state to the initial program state and create the appropriate FTP protocol commands necessary for interactions with an FTP server program. The first line written to standard output following a CONNECT request simply provides a response to the user’s request line. If the CONNECT request is valid, the response output is: CONNECT accepted for FTP server at host &amp;lt;server-host&amp;gt; and port &amp;lt;server-port&amp;gt;&amp;lt;EOL&amp;gt; where &amp;lt;server-host&amp;gt; and &amp;lt;server-port&amp;gt; represent strings extracted from the user request. Your program will then generate the following sequence of valid FTP commands and write them to the standard output following the above response line:&lt;br /&gt;
&lt;br /&gt;
Once a valid CONNECT request is processed, the user may enter any number of GET requests, each of which indicates a file to be retrieved from the FTP server named in the most recent CONNECT request. If the GET request is valid, the response written to standard output is: GET accepted for &amp;lt;pathname&amp;gt;&amp;lt;EOL&amp;gt; where &amp;lt;pathname&amp;gt; represents the string extracted from the user request. Your program will then generate the following sequence of valid FTP commands and write them to the standard output following the above response line:&lt;br /&gt;
&lt;br /&gt;
The string referenced by myIP is a host address in the “dotted decimal” format described above (e.g., 152.2.129.21) and must be translated to the form specified above for &amp;lt;host-address&amp;gt;. The &amp;lt;portnumber&amp;gt; value is to be created in your program by initializing a variable to the value 8000 and incrementing it by one after each PORT command is generated. The value must be converted to the format specified above for &amp;lt;port-number&amp;gt; by doing the inverse computation corresponding to the conversion of port values. When the input line is a valid QUIT request, your program writes the following line to standard output: QUIT accepted, terminating FTP client&amp;lt;EOL&amp;gt; Your program will then generate the following FTP command and write it to the standard output following the above response line. The program will then terminate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 See attachment below&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=1625"&gt;4311-F09-Project_1.pdf&lt;/a&gt; (392455 bytes | downloaded 5 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/413726/413726/java-into-c++/</guid>
      <pubDate>Sun, 21 Feb 2010 00:07:35 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Help Needed</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/413720/413720/help-needed/</link>
      <description>Hi,&lt;br /&gt;
I need help with a project of mine, You must know C inside-out and like Star Trek(proffered, but not needed) because thats what the project revolve around, if you think you can help, drop me a line at:&lt;br /&gt;
hamishwest@ymail.com&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Hamish&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/413720/413720/help-needed/</guid>
      <pubDate>Sat, 20 Feb 2010 21:23:08 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>any help relating the decryption of core FTP password</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/413699/413699/any-help-relating-the-decryption-of-core-ftp-password/</link>
      <description>plz any help me for decrypting the password of core FTP client.....or can any one tell me about its algorithm/function which one is used for its decryption...i have tried for it very well but i haven't got success....plz someone help me.......&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/413699/413699/any-help-relating-the-decryption-of-core-ftp-password/</guid>
      <pubDate>Sat, 20 Feb 2010 01:38:38 -0700</pubDate>
      <category>C and C++</category>
    </item>
  </channel>
</rss>