
283 S.C. 196 (1984)
321 S.E.2d 267
H. G. HALL CONSTRUCTION CO., INC., Respondents,
v.
J.E.P. ENTERPRISES, Jimmy Lee Pappas, and Elizabeth V. Pappas, Appellants.
0276
Court of Appeals of South Carolina.
Heard February 20, 1984.
Decided September 17, 1984.
*197 *198 F. Mikell Harper and Anthony E. Griffis, of Harper & Harper, Beaufort, for appellants.
Hutson S. Davis, Jr., of Levin, Sams & Davis, P.A., Beaufort, for respondent.
Heard Feb. 20, 1984.
Decided Sept. 17, 1984.
BELL, Judge:
H.G. Hall Construction Company commenced this action against J.E.P. Enterprises for breach of a construction contract. J.E.P. admitted the contract but denied any breach thereof. J.E.P. also raised affirmative defenses and counterclaimed for breach of the contract by Hall Construction. The jury returned a verdict of $112,000 for Hall Construction. J.E.P. appeals.
Hall Construction is a Tennessee corporation engaged in general contracting. H.G. Hall, Jr., is president of and owns the corporation. Hall owns another construction company, H.G. Hall and Associates, Inc., which is also Tennessee corporation. J.E.P. is a South Carolina partnership. Jimmy and Elizabeth Pappas are its partners.
In June 1977, J.E.P. entered into a contract with Associates, Inc., to construct a Ramada Inn in Beaufort, South Carolina. After it began start up work on the project, Associates, Inc., discovered it had not renewed its contractor's license for the *199 year 1977 with the South Carolina Licensing Board for Contractors. On September 22, 1977, H.G. Hall, Jr., wrote J.E.P. requesting that Hall Construction, which was licensed in South Carolina, be substituted for Associates, Inc., as the contractor on the Beaufort project.
In December 1977, J.E.P., Associates, Inc., and Hall Construction executed an addendum which amended the contract "to read H.G. Hall Construction Co., Inc.... in lieu of H.G. Hall & Associates, Inc." The addendum further stated that H.G. Hall Construction Co., Inc., agreed "to assume all responsibility for the construction of the project." Under the addendum, Associates, Inc., guaranteed timely performance by Hall Construction.
Hall Construction commenced work on the project in October 1977 and continued to work until March 10, 1978, when J.E.P. terminated the contract because it deemed the work unsatisfactory. On May 14, 1979, Hall Construction filed a petition under Chapter XI of the federal bankruptcy act in the United States Bankruptcy Court in Memphis, Tennessee. After obtaining leave from the bankruptcy court, Hall Construction served J.E.P. with the complaint in the case at bar on April 4, 1980.
The complaint stated two causes of action. The first cause of action alleged breach of the contract by J.E.P. and prayed for $150,530.96 in damages. The second cause of action alleged unjust enrichment and prayed for a quantum meruit recovery of $150,530.96.

I.
Prior to trial, J.E.P. moved to have Hall Construction elect whether it would proceed on the contract or in quantum meruit. The trial judge reserved his ruling on the motion until all the evidence had been presented. At the close of Hall Construction's case in chief, J.E.P. again moved to require an election. The judge once more reserved his ruling. At the close of the evidence, Hall Construction elected to go to the jury on its contract cause of action. J.E.P. excepts to the judge's refusal to require an election of causes of action prior to the close of the evidence.
In determining whether a plaintiff must elect between causes of action prior to trial, our law draws a distinction *200 between two types of cases. Tzouvelekas v. Tzouvelekas, 206 S.C. 90, 33 S.E. (2d) 73 (1945). The plaintiff may be required to elect between causes of action prior to trial if the complaint states distinct causes which are so inherently repugnant that the assertion of one necessarily constitutes an election and precludes an assertion of the other. Id. However, in cases where the complaint states different causes of action, but only one recovery is sought, and the causes are so stated because of an uncertainty as to which the evidence may establish or on which it may appear that plaintiff is entitled to recover, no election is required. Id.; see also Turner v. Belser, 146 S.C. 369, 144 S.E. 73 (1928) (where only one recovery sought, not error to refuse a motion to require the plaintiff to elect upon which cause of action he will proceed to trial); American Equity Life Insurance Co. v. Miller, 248 S.C. 107, 149 S.E. (2d) 331 (1966) (plaintiff may proceed to trial on inconsistent causes of action). We recently held that a plaintiff who states causes of action on an express contract and in quantum meruit need not elect between causes of action where a single recovery is sought. Harmon v. Jenkins, 318 S.E. (2d) 371 (S.C. App. 1984).
In this case, Hall Construction sought $150,530.96 as payment for work completed before J.E.P. terminated the contract. Although the complaint stated two theories for relief, one undelying transaction was involved and only one recovery was sought. Therefore, the trial judge properly allowed the case to proceed to trial on both causes of action.
J.E.P. cites several cases to support its contention that there cannot be a recovery based on quantum meruit when the complaint is founded on a special contract.[1] These cases are distinguishable. In each case plaintiff based his pleadings on an express contract and failed to prove it. The court consistently held that a plaintiff could not alternatively recover in quantum meruit unless he amended his pleadings to state a cause of action in quantum meruit. Since Hall Construction has pleaded causes of action in both contract and quantum meruit, these cases are inapposite.


*201 II.
J.E.P. next takes exception to the dismissal of its counterclaim on a motion for summary judgment. The counterclaim sought $565,000 in general and special damages for alleged breaches of the contract by Hall Construction. Among other things, J.E.P. claimed Hall Construction breached the contract by filing for bankruptcy in Tennessee and by failing to be properly licensed as a general contractor in South Carolina. The trial judge dismissed the counterclaim on the ground that J.E.P.'s exclusive remedy was to file its claims in the bankruptcy court. However, the judge permitted the matters raised in the counterclaim to be asserted as affirmative defenses to Hall Construction's suit.
We find no error in the judge's ruling. Assuming J.E.P.'s claims were meritorious,[2] it was required to present them to the bankruptcy court.
Bankruptcy courts are vested with broad powers to stay state and federal actions against a Chapter XI debtor. Michaels-Stern & Co., Inc. v. Rice Men's Shop, Inc., 274 S.C. 44, 260 S.E. (2d) 717 (1979). Under the Bankruptcy Rules in effect when Hall Construction filed its Chapter XI petition, that petition acted as an automatic stay of the "commencement or the continuation of any court ... proceedings against the debtor...." Bankruptcy Rule 11-44(a). However, such a stay does not bar actions brought by the debtor. In re Revere Cooper & Brass, Inc., 32 B.R. 577 (Bankr. S.D.N.Y. 1983); In re Regal Construction Co., Inc., 28 B.R. 413 (Bankr. Md. 1983).
In Michaels-Stern & Co. Inc. v. Rice Men's Shop, Inc., supra, our Supreme Court described the procedure to be followed in a state court action against a bankrupt. The facts in Michaels-Stern are similar to those in the case of bar. Plaintiff, who had filed for bankruptcy under Chapter XI in New York, brought an action on an account against a men's *202 shop and an individual. These defendants counterclaimed alleging, inter alia, breach of contract. On plaintiff's motion the trial judge dismissed the counterclaim because Chapter XI proceedings were pending in the bankruptcy court and that court had enjoined actions against the plaintiff-debtor. Defendants appealed and the Supreme Court affirmed, holding:
[I]n light of the collateral bankruptcy proceedings in this matter appellant's appropriate course of action is to first petition the bankruptcy court for relief either by way of permission to bring the counterclaim pursuant to 11 U.S.C. § 108, or lifting of the restraining order as to their claims.
Id. 274 S.C. at 47, 260 S.E. (2d) at 719.
J.E.P. relies on Bohack Corporation v. Borden, Inc., 599 F. (2d) 1160 (2d Cir.1979), as authority for allowing the assertion of a counterclaim against a Chapter XI bankrupt. We read Bohack as placing the decision to allow these counterclaims within the sound discretion of the bankruptcy judge. Discretion should be exercised only after weighing the competing interests of the creditors and the debtor in light of the purposes of Chapter XI rehabilitation. Id; Michaels-Stern & Co., Inc. v. Rice Men's Shop, Inc., supra. Bohack does not authorize a state court to weigh the equities and unilaterally modify or ignore the stay of a bankruptcy court.
In Bohack, the creditor, Borden, availed itself of its Chapter XI remedy by filing a proof of claim with the trustee. While Bohack's motion to dismiss Borden's counterclaim was under advisement in the federal district court, Borden opposed, in the bankruptcy court, Bohack's efforts to enjoin Borden from pursuing its counterclaim. On appeal from the bankruptcy court, the court of appeals held that when the balance of equities warrants, the bankruptcy court should modify its stay to allow a counterclaim.
In this case, J.E.P. failed to file a claim in the Chapter XI proceeding against Hall Construction. It did not seek permission of the bankruptcy court to assert its counterclaim against Hall Construction. Having refused to avail itself of these remedies before the bankruptcy court, it cannot now pursue them in a state court action.


*203 III.
Despite the dismissal of its counterclaim, J.E.P. could have raised the claimed illegality of the contract as a defense to Hall Construction's suit. Illegality is an affirmative defense. See H. Lightsey, Jr., South Carolina Code Pleading 192 (1976); cf. Weniger v. Union Center Plaza Associates, 387 F. Supp. 849 (S.D.N.Y. 1974); Fed. R. Civ. Proc., Rule 8(c). An affirmative defense must be pleaded, Few v. Few, 239 S.C. 321, 122 S.E. (2d) 829 (1961), and proved. See Romanus v. Biggs, 214 S.C. 145, 51 S.E. (2d) 503 (1949). J.E.P. did not raise the defense in its second amended answer. Since the matter was not raised in the court below, it cannot now be considered on appeal. Smart v. Charleston Mobile Homes, Inc., 269 S.C. 588, 239 S.E. (2d) 78 (1977); Sanders v. Jasper County Board of Education, 233 S.C. 414, 105 S.E. (2d) 201 (1958). We therefore, decline J.E.P.'s request to set aside the verdict because the contract was illegal.

IV.
J.E.P.'s final exception relates to the denial of its motion for summary judgment on the defense of res judicata. In the fall of 1979, Associates, Inc., brought an action against J.E.P. to enforce a mechanic's lien on the project. The court granted summary judgment to J.E.P. on the ground that Associates, Inc., was not licensed in South Carolina. J.E.P. now maintains that the prior judgment against Associates, Inc., precludes Hall Construction from suing for breach of contract. The trial judge ruled that Hall Construction is not barred by res judicata because it was not a party to the mechanic's lien action and is not in privity with Associates, Inc.
The doctrine of res judicata operates to preclude relitigation of claims which were subject to judgment in a prior action. First National Bank v. United States F. & G. Co., 207 S.C. 15, 35 S.E. (2d) 47 (1945). To establish the defense of res judicata three elements must be shown: (1) identity of the parties or their privies; (2) identity of the subject matter of the litigation; and (3) a final determination on the merits of the claim in the former proceeding. Id; Johnston-Crews Co. v. Folk, 118 S.C. 470, 111 S.E. 15, (1922).
Associates, Inc., and Hall Construction are not the same corporation, nor was Hall Construction a formal party to the *204 mechanic's lien action. Therefore, J.E.P. must show that the two corporations are privies in order to assert the former judgment as a bar to Hall Construction's present action.
The term "privy" when applied to a judgment or decree, means one so identified in interest with another that he represents the same legal right. First National Bank v. United States F. & G. Co., supra. One in privity is one whose legal interests were litigated in the former proceeding. Who are privies cannot be decided according to a hard and fast rule; each case depends on its particular facts. Id.
J.E.P. maintains that Hall Construction was a privy to the former judgment because of its close relation to Associates, Inc. Both corporations are owned by the same person, H.G. Hall, Jr. Both were parties to the contract for the Beaufort project. According to J.E.P., H.G. Hall, Jr., as president of Associates, Inc., controlled the conduct of the first lawsuit. Hall is also president of Hall Construction.
While South Carolina courts have not addressed the precise issue presented here, courts in both North Carolina and Georgia have ruled that no privity exists between commonly owned corporations. Similarly, it has been held there is no privity between a corporation and a shareholder merely because the latter controls the former.
In Troy Lumber Co. v. Hunt, 251 N.C. 624, 112 S.E. (2d) 132 (1960), the court overruled a plea of res judicata holding three was no privity between the corporation and its president and controlling shareholder. Accord, Morris v. Perkins, 6 N.C. App. 562, 170 S.E. (2d) 642 (1969). The same conclusion was also ruled in a case involving privity between two corporations under common ownership. See Girard Trust Bank v. Belk, 41 N.C. App. 328, 255 S.E. (2d) 430 (1979). In Girard Trust Bank, the bank sued an individual (Belk) and a corporation of which he was sole shareholder. The bank had formerly sued another of Belk's wholly owned corporations in a different court. The prior suit resulted in a judgment of dismissal for Belk. In the second suit resulted in a judgment of dismissal for Belk. In the second suit, Belk moved for summary judgment, relying on the res judicata effect of the former dismissal. Belk's motion was granted. In reversing the trial judge, the appeals court held the existence of common ownership between the two corporations created no privity. On similar facts, the Supreme Court of Georgia held there was *205 no privity between two corporations in Anderson Oil Co. v. Benton Oil Co., 246 Ga. 304, 271 S.E. (2d) 207 (1980).
We find these cases persuasive. Although Hall Construction and Associates, Inc., are both corporations owned by H.G. Hall, Jr., they are different corporations. On the facts of this case common ownership is not enough to establish privity for the purposes of res judicata. Accordingly, we hold that no privity existed between Associates, Inc., and Hall Construction in the former suit. Thus, the former judgment against Associates, Inc., is no bar to this action.
Affirmed.
SANDERS, and SHAW, J., concur.
NOTES
[1]  Fitzsimons v. Guanahani Co., 16 S.C. 192 (1881); Birlant v. Cleckley, 48 S.C. 298, 26 S.E. 600 (1897); King v. Western Union Telegraph Co., 84 S.C. 73, 65 S.E. 944 (1909); Bowen v. Johnston, 87 S.C. 250, 69 S.E. 294 (1910); Cleveland & Williams v. Butler, 94 S.C. 406, 78 S.E. 81 (1913).
[2]  The record shows Hall Construction filed its bankruptcy petition over a year after J.E.P. terminated the contract. It is therefore difficult to see how filing for bankruptcy constituted a breach of the contract. Equally puzzling is J.E.P.'s assertion that it had a right to pursue its counterclaim because the contract is illegal on its face. J.E.P. bases its claim of facial illegality on the alleged failure of Hall Construction to obtain proper licensing; but nothing on the face of the contract discloses the status of Hall Construction's license in South Carolinas. Evidence presented on the motion for summary judgment showed that the company was licensed in South Carolina at the time it entered the contract.
