The one question presented on this appeal is whether the trial court erred by dismissing the action for failure to state a claim for which relief could be granted pursuant to Rule 12(b)(6). In ruling on a motion pursuant to Rule 12(b)(6) the allegations of the complaint must be viewed as admitted, and on that basis the court must determine as a matter of law whether the allegations *273state a claim for which relief can be granted. Stanback v. Stanback, 297 N.C. 181, 254 S.E. 2d 611 (1979). Generally, a complaint should not be dismissed for insufficiency unless it appears, to a certainty that the plaintiff is entitled to no relief under any state of facts which could be proved in support of the claim. Id.
The allegations in the present case that defendant Halifax County has appropriated to its own use a portion of plaintiffs property are sufficient to withstand a motion to dismiss a claim for failure to state a claim upon which relief can be granted pursuant to Rule 12(b)(6). The theory of a claim is to be determined from the evidence and not from the pleadings. Defendant Halifax County, in the present case, has suggested that plaintiffs claim, if any, is in the nature of a claim for “inverse condemnation.” The fact that plaintiff might have mislabeled his claim as one for damages for trespass, one to quiet title, or one for injunctive relief, is of no significance in ruling on the motion to dismiss pursuant to Rule 12(b)(6). Plaintiff has not alleged an insurmountable bar to a claim for relief for inverse condemnation. Thus, the trial court erred in dismissing his “complaint,” and the order will be reversed and the cause remanded to the superior court for further proceedings.
Reversed and remanded.
Judges Wells and Cozort concur.