Thread: ODD error(s);

  1. #1
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331

    ODD error(s);

    Ok heres the errors, now bear in mind that the program WORKS...i get these after i close it.

    Code:
    Loaded 'ntdll.dll', no matching symbolic information found.
    Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
    Loaded 'C:\WINDOWS\system32\apphelp.dll', no matching symbolic information found.
    Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.
    Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.
    The thread 0xE4C has exited with code 0 (0x0).
    The program 'C:\Program Files\Microsoft Visual Studio\MyProjects\ACIWork1\Debug\ACIWork1.exe' has exited with code 0 (0x0).
    heres the program code....

    Code:
    /*	Steven Billington
    	December 8, 2002
    	ACIWork1.cpp
    
    	First assignment from ACI, December 4, 2002.
    	Program uses two ref parameters to multiply an 
    	int and a double.
    */
    
    #include "stdafx.h"
    #include <iostream.h>
    #include <iomanip.h>
    #include <stdlib.h> //for pause
    
    /*	Prototype function*/
    int multiply(int &val1, double &val2);
    
    
    int main(int argc, char* argv[])
    {
    	int f_val;
    	double s_val;
    
    	cout<<"Enter an integer value: ";
    	cin>>f_val;
    
    	cout<<"Enter a double value: ";
    	cin>>s_val;
    
    	cout<<setiosflags(ios::fixed | ios::showpoint | ios::right)
    		<<setprecision(2);
    
    	cout<<"You originally input: \n";
    	cout<<"\n"<<f_val<<"\t"<<s_val
    		<<endl;
    
    	cout<<"\nThe product of these two values is: \n";
    	cout<<"\n"<<multiply(f_val,s_val)
    		<<endl;
    
    	system("pause"); 
    
    	return 0;
    }
    
    int multiply(int &val1, double &val2)
    {
    	double product;
    
    	product = val1 * val2;
    
    	return product;
    }

  2. #2
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    what else have you included in stdafx.h ?
    just copy that code too, we'll need it to compile
    PHP and XML
    Let's talk about SAX

  3. #3
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    i didn't include anything in it, thats there from the "simple project" option in VS 6.0 that i have never used before, i normally type the whole code sheet myself.

    here it is anyway:

    Code:
    // stdafx.h : include file for standard system include files,
    //  or project specific include files that are used frequently, but
    //      are changed infrequently
    //
    
    #if !defined(AFX_STDAFX_H__1961167C_A423_42EB_A89C_6BF8163D0599__INCLUDED_)
    #define AFX_STDAFX_H__1961167C_A423_42EB_A89C_6BF8163D0599__INCLUDED_
    
    #if _MSC_VER >= 1000
    #pragma once
    #endif // _MSC_VER >= 1000
    
    #define VC_EXTRALEAN		// Exclude rarely-used stuff from Windows headers
    
    #include <afxwin.h>         // MFC core and standard components
    #include <afxext.h>         // MFC extensions
    #include <afxdisp.h>        // MFC OLE automation classes
    #ifndef _AFX_NO_AFXCMN_SUPPORT
    #include <afxcmn.h>			// MFC support for Windows Common Controls
    #endif // _AFX_NO_AFXCMN_SUPPORT
    
    
    //{{AFX_INSERT_LOCATION}}
    // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
    
    #endif // !defined(AFX_STDAFX_H__1961167C_A423_42EB_A89C_6BF8163D0599__INCLUDED_)

  4. #4
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    But this other program works FINE no errors WTF!

    Code:
    /*	Steven Billington
    	December 7, 2002
    	ACIWork2.cpp
    
    	Program from ACI Assignment, December 4, 2002.
    	Program uses and int and a double with two
    	ref parameters, adds 2 to each value and returns
    	them to the main function.
    */
    
    #include "stdafx.h"
    #include <iostream.h>
    #include <iomanip.h>
    #include <stdlib.h>
    
    void add(int &val1, double &val2);
    
    int main(int argc, char* argv[])
    {
    	int f_val;
    	double s_val;
    
    	cout<<"Enter an integer value: ";
    	cin>>f_val;
    
    	cout<<"Enter a double value: ";
    	cin>>s_val;
    
    	cout<<setiosflags(ios::fixed | ios::showpoint | ios::right)
    		<<setprecision(2);
    
    	cout<<"\nOriginal values were: \n";
    	cout<<"\n"<<f_val<<"\t"<<s_val
    		<<endl;
    
    	add(f_val,s_val);
    
    	cout<<"\nNew values are: \n";
    	cout<<"\n"<<f_val<<"\t"<<s_val
    		<<endl;
    
    	system("pause");
    
    	return 0;
    }
    
    void add(int &val1, double &val2)
    {
    	val1 += 2;
    	val2 += 2;
    }

  5. #5
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    well first of all you're returning a double from a function designed to return an int, i changed that, it compiled and ran just fine.
    Code:
    /*	Steven Billington
    	December 8, 2002
    	ACIWork1.cpp
    
    	First assignment from ACI, December 4, 2002.
    	Program uses two ref parameters to multiply an 
    	int and a double.
    */
    
    #include "stdafx.h"
    #include <iostream.h>
    #include <iomanip.h>
    #include <stdlib.h> //for pause
    
    /*	Prototype function*/
    double multiply(int &val1, double &val2);
    
    
    int main(int argc, char* argv[])
    {
    	int f_val;
    	double s_val;
    
    	cout<<"Enter an integer value: ";
    	cin>>f_val;
    
    	cout<<"Enter a double value: ";
    	cin>>s_val;
    
    	cout<<setiosflags(ios::fixed | ios::showpoint | ios::right)
    		<<setprecision(2);
    
    	cout<<"You originally input: \n";
    	cout<<"\n"<<f_val<<"\t"<<s_val
    		<<endl;
    
    	cout<<"\nThe product of these two values is: \n";
    	cout<<"\n"<<multiply(f_val,s_val)
    		<<endl;
    
    	system("pause"); 
    
    	return 0;
    }
    
    double multiply(int &val1, double &val2)
    {
    	double product;
    
    	product = val1 * val2;
    
    	return product;
    }
    PHP and XML
    Let's talk about SAX

  6. #6
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    on that second program you posted,
    change the void function to a double and return a double.
    PHP and XML
    Let's talk about SAX

  7. #7
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    I'm usually not that careless, i'm sick tho. Thanks alot, i'm going to go be sick in school now, gotta keep my perfect attendence ya know.

    Thnx again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. global namespace errors
    By stubaan in forum C++ Programming
    Replies: 9
    Last Post: 04-02-2008, 03:11 PM
  2. Ten Errors
    By AverageSoftware in forum Contests Board
    Replies: 0
    Last Post: 07-20-2007, 10:50 AM
  3. Header File Errors...
    By Junior89 in forum C++ Programming
    Replies: 5
    Last Post: 07-08-2007, 12:28 AM
  4. Errors when including winsock2.h
    By skiingwiz in forum Windows Programming
    Replies: 2
    Last Post: 12-27-2002, 07:32 PM
  5. errors in class(urgent)
    By ayesha in forum C++ Programming
    Replies: 2
    Last Post: 11-10-2001, 06:51 PM