1 This was an action based upon a written contract for a breach of warranty in the sale of a steam shovel. The case was tried upon an amended complaint to which the contract which is the foundation of the action was not made an exhibit. The amended complaint states the contents of the contract in general terms and refers to it as being filed with the original complaint marked “Exhibit A”; but, as the original complaint was superseded by the filing of the amended complaint and was thereby taken out of the record, a reference to an exhibit filed with such original complaint does not aid the amended complaint. We must hold, therefore, that the contract which forms the foundation of the action is not filed with the amended complaint upon which the case was tried. Western Assur. Co. v. McCarty (1897), 18 Ind. App. 449, 48 N. E. 265; Western Union Tel. Co. v. State (1896), 146 Ind. 54, 44 N. E. 793.
2. A demurrer filed by appellant to this amended complaint was overruled and this action of the trial court is assigned as error. Where a complaint is founded upon a written contract, such contract must be set out in the body of the complaint or filed as an exhibit and properly identified. A complaint defective in this particular is insufficient to withstand a demurrer. §368 Burns 1908, §362 R. S. 1881; Elwood, etc., Oil Co. v. Glaspy (1906), 38 Ind. App. 634, 77 N. E. 956; Brown v. State, ex rel. (1873), 44 Ind. 222. While the amended complaint would have been sufficient if questioned for the first time after verdict, by a motion in arrest of judgment, or by assignment of error in this court, it was clearly insufficient as against a demurrer and the court erred in holding it to be sufficient.
*313. *30Appellee practically concedes this error, but it insists that the judgment should not be reversed on this account, for the reason that the subsequent proceedings as disclosed by the *31record show that this error was not prejudicial to appellant. Our attention is called to the various provisions of the statutes of this State providing that judgments shall not he reversed for error of the trial court in cases where it is apparent from the record that the merits of the cause have been fairly determined, and these statutes are invoked to prevent a reversal in this case. There are three sections bearing upon this question. Section 350 Burns 1908, §345 E. S. 1881, provides: “But no objection taken by demurrer, and overruled, shall be sufficient to reverse the judgment, if it appear from the whole record that the merits of the cause have been fairly determined. ” Section 407 Burns 1908, §398 E. S. 1881, is as follows: The court must, in every stage of the action, disregard any error or defect in the pleadings or proceedings which does not affect the substantial rights of the adverse party; and no judgment can be reversed or affected by reason of such error or defect.” Section 700 Burns 1908, §658 E. S. 1881, provides: “No judgment shall be stayed or reversed, in whole or in part, by the supreme court, for any defect in form, variance, or imperfections contained in the record, pleadings, process, entries, returns, or other proceedings therein, which by law might be amended by the court below, but such defects shall he deemed to be amended in the supreme court; nor shall any judgment be stayed or reversed, in whole or in part, where it shall appear to the court that the merits of the cause have been fairly tried and determined in the court below.” "When a pleading is held sufficient by the court as against a demurrer, the party demurring may stand upon his demurrer and appeal, or he may plead to the merits. If he takes the former course, the only question presented on appeal is the sufficiency of the pleading to" which the demurrer was directed, and, in ease such pleading is held insufficient on appeal, the judgment will be reversed. If he takes the second course, pleads to the merits and proceeds to final judgment, the objection taken by demurrer, may or may not *32be available to reverse on appeal. If the record does not show affirmatively that such ruling was harmless to the adverse party, the ease should be reversed; but if the whole record shows that the case has been fairly determined on its merits, and that the erroneous ruling on demurrer was not prejudicial, the statutes quoted require that the judgment should be affirmed, regardless of such error.
4. In this case the record discloses, that after the complaint was held sufficient, the defendant filed an answer and also a cross-complaint based upon the same contract and that issues were formed upon this cross-complaint. Upon the trial of the issues thus formed, the plaintiff introduced and read in evidence the contract upon which the complaint is based and which should have been made an exhibit thereto. The defendant did not object to this evidence upon the ground that the contract was not filed or that it was not made an exhibit to the complaint. If it had made such objection undoubtedly the court would have permitted plaintiff to amend its complaint by making the contract an exhibit. Appellant, however, made no objection to the proffered evidence but allowed it to go to the jury together with the other evidence offered in the case, hoping no doubt, for a verdict in its favor on the merits. Disappointed in this, it now seeks a reversal upon the ground that the complaint was insufficient to withstand a demurrer for the reason that the contract thus introduced in evidence and considered by the jury was not filed as an exhibit to the amended complaint. In the opinion of the court, this is exactly the kind of a case the statutes we have quoted were intended to meet. In the case of Baker v. Pyatt (1886), 108 Ind. 61, 63, 9 N. E. 112, the Supreme Court held that a judgment would not be reversed because the plaintiff failed to file a copy of the deed sought to be reformed, with his complaint seeking such reformation. The court said: “After a careful examination, we have concluded that the merits of the cause have been fairly determined, and that, there*33fore, under our statute, the judgment should not he reversed simply because a copy of the deed was not filed with the second paragraph of the complaint. R. S. 1881, section 345; Sohn v. Cambern [1886], 106 Ind. 302, 6 N. E. 813. The failure to file a copy of the deed, if that rendered the paragraph defective, was a matter somewhat formal in its character. It was a defect that would have been cured by verdict, had there been no demurrer, and such a defect as the above, the statute requires shall be disregarded, where a cause has been fairly determined.”
5. 6. *344. *33It is true that in passing upon the sufficiency of a pleading to withstand a demurrer, the court will look solely to the facts averred in such pleading, and that it must stand or fall by its own averments, and that the evidence, findings, or other parts of the record can not be considered in determining whether the pleading is sufficient. Pittsburgh, etc., B. Go. v. Moore (1899), 152 Ind. 345, 53 N. E. 290, 44 L. E. A. 638; Midland Steel Go. v. Citizens Nat. Bank (1901), 26 Ind. App. 71, 59 N. E. 211. Many other cases might be cited which announce the same proposition, but the rule thus stated is to be applied only in determining the sufficiency of the pleading to withstand a demurrer. In passing upon this question, the trial court has only the pleading before it, and this court should place itself, as nearly as possible, in the position of the trial court. The statutes quoted, however, seem to contemplate that this court, before reversing a case on account of an erroneous ruling on demurrer, shall do Something more than merely decide that such ruling was erroneous. After we have decided that question, we are required by the statute to consider and determine whether such ruling, in view of the whole record, has prejudiced the adverse party in his substantial rights. In deciding this question we may look to the evidence, the findings, the answers to interrogatories, and to any other part of the record which can *34throw any light upon the subject; and, if it affirmatively appears from the whole record, that the erroneous ruling on demurrer did not prejudice the adverse party and that the case has been fairly tried and determined on its merits, it is our duty to affirm regardless of such error. Gillilcmd v. Jones (1896), 144 Ind. 662, 43 N. E. 939, 55 Am. St. 210; Miller v. Bottenberg (1896), 144 Ind. 312, 41 N. E. 804; Daly v. Gubbins (1908), 170 Ind. 105, 82 N. E. 659; 'Walling v. Burgess (1890), 122 Ind. 299, 22 N. E. 419, 23 N. E. 1076, 7 L. R. A. 481; Jennings v. Dark (1911), 175 Ind. 332, 92 N. E. 778; Beasley v. Phillips (1898), 20 Ind. App. 182, 50 N. E. 388; Bowen v. W. O. Eaton & Go. (1910), 46 Ind. App. 65, 89 N E. 961. The failure on the part of the plaintiff to file the contract sued on as an exhibit to his amended complaint did not prejudice appellant, and the judgment will not be reversed because of the erroneous ruling on the demurrer thereto.
7. *358. *34The trial court gave to the jury a number of instructions, among which is instruction No. 5. Appellant claims that this instruction is erroneous. The correctness of this instruction is properly presented by the record for our decision, and this presents the only other objection relied on by appellant for reversal. The instruction is clearly erroneous. It permits the jury to determine for itself whether the contract sued on is certain and clear in its meaning, or whether it is doubtful or ambiguous. The jury is then told that, if it finds the contract to be ambiguous, it should apply certain tests and consider certain evidence for the purpose of ascertaining the true intent of the parties to the contract.. Such an instruction can not be too strongly condemned. If a contract is ambiguous, it is the duty of the court to construe it and to inform the jury what meaning it will be required to place upon it. If the court decides that a contract is uncertain and ambiguous in its meaning, he should then indicate the particular point or points in which it is uncertain, and submit to the jury the question *35of the real meaning and intent of the parties, under the proper evidence and instructions. The court erred in giving this instruction to the jury, but we are again called upon to inquire whether the error was prejudicial to appellant. If the. record discloses affirmatively that the jury placed the correct construction upon the contract, it can not be said that appellant was injured by the failure of the court to perform its duty. If the jury properly understood the meaning of the contract, it is not material whether that meaning was adopted from the court, or derived by the jury from a consideration of the contract. The result is the same in either ease. We have examined the contract introduced in evidence and we have also examined the answers of the jury to the interrogatories filed with the general verdict. From these answers the court is convinced that the jury placed upon this contract its proper construction.The errors complained of were not prejudicial to appellant and the judgment is therefore affirmed.
Adams, C. J., Hottel, P. J., Ibach, J., and Felt, J., concur. Myers, J., concurs in result. Judgment affirmed.