More help needed

This is a discussion on More help needed within the C++ Programming forums, part of the General Programming Boards category; I've decided to add some more operations to my chemistry program. Now I'm digging into switch cases and and having ...

  1. #1
    Niq
    Niq is offline
    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:
    Attached Files Attached Files

  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
    Niq
    Niq is offline
    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, 10: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, 12:55 PM
  3. lock needed in this scenario?
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 05-25-2008, 08:22 AM
  4. C++ help needed
    By Enkindu in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-01-2004, 12:24 AM
  5. semi-colon - where is it needed
    By kes103 in forum C++ Programming
    Replies: 8
    Last Post: 09-12-2003, 06:24 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21