Thread: More help needed

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    5

    Unhappy More help needed

    I've decided to add some more operations to my chemistry program. Now I'm digging into switch cases and and having some trouble.

    I am trying to define the variables T1, T2, V11, and V21 as floats, but I get this error:

    test2.ccp:128: warning: multi-line literals are deprecated
    test2.cpp: In fuction 'int main()':
    test2.ccp:128: T1 undelcared (first use this function)
    test2.cpp:128: (Each undeclared identifier is reported only once for each function it appears in.)
    test2.cpp:128: parse error before string constant

    So basicly my question is: why is it not identifying T1?

    Here is the code:

  2. #2
    Registered User
    Join Date
    Feb 2003
    Posts
    162
    Code:
    	if(T1==0)
    	
    	cout<<T1 is "<<(V11*T2)/V21<<'\n';
    
    	if(T2==0)
    
    	cout<<T2 is "<<(V21*T1)/V11<<'\n';
    no " before the T1 and T2

    should be
    Code:
    	if(T1==0)
    	
    	cout<<"T1 is "<<(V11*T2)/V21<<'\n';
    
    	if(T2==0)
    
    	cout<<"T2 is "<<(V21*T1)/V11<<'\n';

  3. #3
    Registered User
    Join Date
    Apr 2003
    Posts
    5
    Doh, so simple. Obvisiously over-looked that. Thanks for the help Jamsan

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. free needed or not?
    By quantt in forum Linux Programming
    Replies: 3
    Last Post: 06-25-2009, 09:32 AM
  2. C Programmers needed for Direct Hire positions
    By canefan in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 09-24-2008, 11:55 AM
  3. lock needed in this scenario?
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 05-25-2008, 07:22 AM
  4. C++ help needed
    By Enkindu in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 08-31-2004, 11:24 PM
  5. semi-colon - where is it needed
    By kes103 in forum C++ Programming
    Replies: 8
    Last Post: 09-12-2003, 05:24 PM