Can't figure out why I'm getting errors

I wrote a program to demonstrate using default parameters and when I try to test it I get the errors "PrintSomethingLoop: identifier not found.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <iostream>
#include <string>
using namespace std;

//function declaration with default parameters
void PringSomethingLoop(string text = "Default", int n = 5);

int main()
{
	//specify an arguement for both parameters.
	PrintSomethingLoop("Hello, World", 2);

	//specify argument for first parameter
	PrintSomethingLoop("Hello, C++");

	//use defaults for both parameters
	PringSomethingLoop();
}
void PrintSomethingLoop(string text, int n)
{
	for (int i = 0; i < n; ++i)
	{
		cout << text << endl;
		cout << endl;
	}
}
Typos.

PringSomethingLoop

Pring Something, you probably meant Print.
line 6: PringSomethingLoop

did you mean PrintSomethingLoop ?

your declaration says "pring" not "print".
In line 6 you declare it as PringSomethingLoop

In lin 19 you define it as PrintSomethingLoop
oh my god I feel like an idiot!
Topic archived. No new replies allowed.