<P> Dan,
<P>&nbsp;&nbsp;&nbsp;&nbsp; You can insert the "\Tp" switch at the following way:
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Menu "Project", "Settings...". look for "C/C++" session and add the switch in "Project Options".
<P>&nbsp;&nbsp;&nbsp;&nbsp; That's all. :-)
<P>Lauro
<P>&nbsp; <B><I>Dan Digman &lt;digman.6@msn.com&gt;</I></B> escreveu: 
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>

<DIV><FONT face=Arial>Hello Help -</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>I am new to Visual C++ and have compiled a few resource books to help in the learning process.&nbsp; However, this problem - as stated by an earlier user - I have been unable to sole.</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>***&nbsp; Program ***</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>// Program Random Sequence Number Generator<BR>#include &lt;cstdlib&gt;<BR>#include &lt;iostream&gt;<BR>#include &lt;ctime&gt;</FONT></DIV>
<DIV>&nbsp;</DIV><FONT face=Arial>
<DIV><BR>int main()<BR>{<BR>&nbsp;std::cout &lt;&lt; "Random Sequence Number Generator (RSNG). \n"; <BR>&nbsp;std::cout &lt;&lt; "Written by Dan Digman on 26-July-2002 using C++. \n \n";</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;std::cout &lt;&lt; "Input number of Replications (reps) ... ";<BR>&nbsp;int reps;<BR>&nbsp;std::cin &gt;&gt; reps;<BR>&nbsp;std::cout &lt;&lt; "\n";</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;std::cout &lt;&lt; "Input number of treatments per replication (rep) ... ";<BR>&nbsp;int treats, limit;<BR>&nbsp;std::cin &gt;&gt; treats;<BR>&nbsp;limit = treats + 1;<BR>&nbsp;std::cout &lt;&lt; "\n \n";</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;// Allocate memory for the array<BR>&nbsp;int* intArray;<BR>&nbsp;intArray = new treatnum[treats];<BR>&nbsp;<BR>&nbsp;// Print out the current replication number<BR>&nbsp;while (int c &lt;= reps) {<BR>&nbsp;&nbsp;std::cout &lt;&lt; "Replication #%d \n",c;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;// Get random numbers<BR>&nbsp;&nbsp;int d = 1;<BR>&nbsp;&nbsp;while (d &lt;= treats) {<BR>&nbsp;&nbsp;&nbsp;rnumber = random(treats) + 1;<BR>&nbsp;&nbsp;&nbsp;if treatnum[d] &lt; limit {<BR>&nbsp;&nbsp;&nbsp;&nbsp;std::cout &lt;&lt; "%d ",rnumber;<BR>&nbsp;&nbsp;&nbsp;&nbsp;treatnum[d] = limit;<BR>&nbsp;&nbsp;&nbsp;&nbsp;d++;<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;// Initialize the array<BR>&nbsp;&nbsp;int i = 0;<BR>&nbsp;&nbsp;while (i &lt; treats) { <BR>&nbsp;&nbsp;&nbsp;treatnum[i] = 1;<BR>&nbsp;&nbsp;&nbsp;i++;<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;std::cout &lt;&lt; "\n \n";<BR>&nbsp;&nbsp;c++;<BR>&nbsp;}<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>// Generate a random number and return it to main<BR>int random(num)<BR>{<BR>&nbsp;int num;<BR>&nbsp;return static_cast&lt;int&gt;((num*static_cast&lt;long&gt;(rand()))/(RAND_MAX+1));<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>*** End Of File ***</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>When Compiled, I receive the following message ...</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>--------------------Configuration: crand - Win32 Debug--------------------<BR>Compiling...<BR>crand.c<BR>c:\program files\microsoft visual studio\vc98\include\eh.h(32) : fatal error C1189: #error :&nbsp; "eh.h is only for C++!"<BR>Error executing cl.exe.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>crand.obj - 1 error(s), 0 warning(s)</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>***&nbsp; End of Compile ***</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>I found a few responses of which I have unsuccessfully tried.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>I have also found a few responses from the comp sci dept at Virginia Tech - none of which pertain to this particular error message.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Then I came across a particular response on your site :</FONT></FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>You can use the \Tp switch.&nbsp; It tells the compiler that .c files are = C++.</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>Frankly, I would like to try this to see if it would solve my compiling problems but I have no idea where in the program to implement this statement or how to use it.</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>Thank you in advance for your help in this matter...</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>-Dan</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><A href="mailto:digman.6@osu.edu">digman.6@osu.edu</A></FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV></BLOCKQUOTE><p><hr size=1>
<a href="http://br.geocities.yahoo.com/v/pb.html"><b>Yahoo! PageBuilder</b></a> - O super editor para criação de sites: é grátis, fácil e rápido.