<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic C++ in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/c/m-p/2912188#M107528</link>
    <description>what forum do i go to fo C++ help?</description>
    <pubDate>Mon, 24 Feb 2003 23:48:10 GMT</pubDate>
    <dc:creator>Russell_13</dc:creator>
    <dc:date>2003-02-24T23:48:10Z</dc:date>
    <item>
      <title>C++</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c/m-p/2912188#M107528</link>
      <description>what forum do i go to fo C++ help?</description>
      <pubDate>Mon, 24 Feb 2003 23:48:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c/m-p/2912188#M107528</guid>
      <dc:creator>Russell_13</dc:creator>
      <dc:date>2003-02-24T23:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: C++</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c/m-p/2912189#M107529</link>
      <description>Assuming this is UNIX, 'Languages'.</description>
      <pubDate>Mon, 24 Feb 2003 23:50:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c/m-p/2912189#M107529</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-02-24T23:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: C++</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c/m-p/2912190#M107530</link>
      <description>ok, well lets see if i can explain this. sorry about giving the whole code, but it all needs to be there. &lt;BR /&gt;&lt;BR /&gt;I am trying to make a structure for student data, look at the //comments. then i need to enter data for this student and pass it to this structure. but when the y enter in the state it needs to validate the state from its function. (only CA, WY, TX, AZ, TN are the valid states, if valid print 0, if any other state is entered print 1, as error.. Ive been stuck on this for about 2 hrs trying to figure this out. please look :)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;BR /&gt;#include &lt;STRING&gt;&lt;BR /&gt;#include &lt;IOMANIP&gt;&lt;BR /&gt;&lt;BR /&gt;using namespace std;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;//struct student // this is my struc but it wont let me pass info.&lt;BR /&gt;//{&lt;BR /&gt;char fName;&lt;BR /&gt;char lName;&lt;BR /&gt;int iDnumber;&lt;BR /&gt;int iCredits;&lt;BR /&gt;int Tuition;&lt;BR /&gt;char Resident;&lt;BR /&gt;char state[3];&lt;BR /&gt;//};&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;int const Res_Cred = 250;&lt;BR /&gt;int const Max_Of_Res = 3350;&lt;BR /&gt;int const Non_Res_Cred = 450;&lt;BR /&gt;int const Max_Of_Nonres = 6000;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;cout &amp;lt;&amp;lt;"Enter students First Name: ";&lt;BR /&gt;cin &amp;gt;&amp;gt; fName;&lt;BR /&gt;cin.ignore( 10000, '\n');&lt;BR /&gt;&lt;BR /&gt;cout &amp;lt;&amp;lt;"Enter students Last Name: ";&lt;BR /&gt;cin &amp;gt;&amp;gt; lName;&lt;BR /&gt;cin.ignore( 10000, '\n');&lt;BR /&gt;&lt;BR /&gt;cout &amp;lt;&amp;lt; "Enter school id number: ";&lt;BR /&gt;cin &amp;gt;&amp;gt; iDnumber;&lt;BR /&gt;cin.ignore( 10000, '\n');&lt;BR /&gt;&lt;BR /&gt;cout &amp;lt;&amp;lt; "How many credits are you taking: ";&lt;BR /&gt;cin &amp;gt;&amp;gt; iCredits;&lt;BR /&gt;cin.ignore( 10000, '\n');&lt;BR /&gt;&lt;BR /&gt;cout &amp;lt;&amp;lt; "What state are you from example: CA: ";&lt;BR /&gt;cin &amp;gt;&amp;gt; state;&lt;BR /&gt;cin.ignore( 10000, '\n');&lt;BR /&gt;&lt;BR /&gt;cout &amp;lt;&amp;lt; "Are you a resident? (Y/N)";&lt;BR /&gt;cin &amp;gt;&amp;gt; Resident;&lt;BR /&gt;cin.ignore( 10000, '\n');&lt;BR /&gt;&lt;BR /&gt;if ((Resident == 'Y') || (Resident == 'y'))&lt;BR /&gt;{&lt;BR /&gt;Tuition = iCredits * Res_Cred;&lt;BR /&gt;cout &amp;lt;&amp;lt; "They are a Resident" &amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;Tuition = iCredits * Non_Res_Cred;&lt;BR /&gt;cout &amp;lt;&amp;lt; "They are Non Resident" &amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt;}&lt;BR /&gt;&lt;BR /&gt;if((iCredits &amp;lt; 0) || (iCredits &amp;gt;20))&lt;BR /&gt;cout &amp;lt;&amp;lt; "ERROR: STUDENTS DATA IS OUT OF RANGE"&amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt;&lt;BR /&gt;if (Tuition &amp;lt; Max_Of_Res)&lt;BR /&gt;cout &amp;lt;&amp;lt; "They are a Part time Student" &amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt;else if (Tuition &amp;gt;= Max_Of_Res)&lt;BR /&gt;cout &amp;lt;&amp;lt; "They are a Full Time Student" &amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt;&lt;BR /&gt;cout &amp;lt;&amp;lt; setw(5) &amp;lt;&amp;lt; "ID" &lt;BR /&gt;&amp;lt;&amp;lt; setw(12)&amp;lt;&amp;lt; "Credits" &amp;lt;&amp;lt; endl&lt;BR /&gt;&amp;lt;&amp;lt; setw(5) &amp;lt;&amp;lt; "...." &lt;BR /&gt;&amp;lt;&amp;lt; setw(12)&amp;lt;&amp;lt; "......." &amp;lt;&amp;lt; endl&lt;BR /&gt;&amp;lt;&amp;lt; setw(5) &amp;lt;&amp;lt; iDnumber &lt;BR /&gt;&amp;lt;&amp;lt; setw(9) &amp;lt;&amp;lt; iCredits &amp;lt;&amp;lt; endl;&lt;BR /&gt;&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;/IOMANIP&gt;&lt;/STRING&gt;&lt;/IOSTREAM&gt;</description>
      <pubDate>Mon, 24 Feb 2003 23:56:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c/m-p/2912190#M107530</guid>
      <dc:creator>Russell_13</dc:creator>
      <dc:date>2003-02-24T23:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: C++</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c/m-p/2912191#M107531</link>
      <description>Mayby I'm dummy, but I've read everything several times and I can't figure out what the problem is...&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Feb 2003 13:56:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c/m-p/2912191#M107531</guid>
      <dc:creator>Adam J Markiewicz</dc:creator>
      <dc:date>2003-02-25T13:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: C++</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c/m-p/2912192#M107532</link>
      <description>Russell,&lt;BR /&gt;&lt;BR /&gt;You've defined your data structure, but have not declared any variables of that data type. You need to create a student, eg&lt;BR /&gt;&lt;BR /&gt;int const Max_Of_Nonres = 6000; &lt;BR /&gt;struct student fred;&lt;BR /&gt;&lt;BR /&gt;Or perhaps an array of students:&lt;BR /&gt;&lt;BR /&gt;struct student students[50];&lt;BR /&gt;&lt;BR /&gt;Once you've done that, to access a variable within the structure you need to use the dot notation, eg:&lt;BR /&gt;&lt;BR /&gt;students[n].iDnumber = 44;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Tue, 25 Feb 2003 14:03:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c/m-p/2912192#M107532</guid>
      <dc:creator>John O'Driscoll_1</dc:creator>
      <dc:date>2003-02-25T14:03:48Z</dc:date>
    </item>
  </channel>
</rss>

