To be honest I’m new to this and thought it would simply print out two right aligned pyramids with a gap in between.
Those two for() loops are printing the same NUMBER of hashes from where the stdout stream happens to be at the point the for() loop starts printing. Since the stdout stream is at "column" 0 before the first for() loop, the first set of hashes is right justified (preceded with spaces), and since the stdout stream is at "column" H+2 after the first two inner for() loops run, the second set of hashes always starts in the same "column."
You might want to consider changing your for() loop boundaries so that the pyramid has a "pointed" top at level 1, and no leading/trailing spaces at level h:
for (int i = 0; i < h; i++)
// Print out this many spacesfor (int j = 0; j < h - i - 1; j++)
// Print left hashesfor (int j = 0; j < i + 1; j++)
// Print right hashesfor (int j = 0; j < i + 1; j++)
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
No but the debug information is. If the debugger cannot match the source line with the information in the PDB then it will put this message. Check that you do not have links to out of date files in the project anywhere. Alternatively make sure that there is not a file included somewhere that is not getting rebuilt.
A senior software tester and a entry level tester went into the company cafeteria and sat down. The senior employee removed a tuna sandwich from an old brown bag. The entry level tester promptly removed a ham sandwich from his man-purse.
Then a security guard noticed that these employees were breaking the rules and quickly came over to the table. "The company rules clearly state that you cannot bring your own lunch to the cafeteria!" the guard exclaimed.
The senior tester looked at the security guard, then shrugged his shoulders and exchanged sandwiches with the entry level tester. "I found a loophole in the company rule." he commented with his mouth full.
Maybe someone with more test experience will answer your question. You might get greater visibility by posting your question in the 'Quick Answers' section.
All my code is C so unity, ceedling and cmock and it's irrelevent if it's linux, windows or embedded code. At the end of the day you are testing the code not the compiler implementation and optimizations of the code.
There is a pretty good background to it all at Throwtheswitch.org[^]
There are also forums there if you need to ask questions.