13,836,537 members

# C / C++ / MFC

 const char [] and char[] difference question focusdoit10-May-18 15:26 focusdoit 10-May-18 15:26
 Re: const char [] and char[] difference question David Crow10-May-18 18:22 David Crow 10-May-18 18:22
 Re: const char [] and char[] difference question Richard MacCutchan10-May-18 22:25 Richard MacCutchan 10-May-18 22:25
 Re: const char [] and char[] difference question Victor Nijegorodov11-May-18 0:03 Victor Nijegorodov 11-May-18 0:03
 Re: const char [] and char[] difference question samzcs11-May-18 3:24 samzcs 11-May-18 3:24
 Please advise me on C++ coding structure Vaclav_9-May-18 5:24 Vaclav_ 9-May-18 5:24
 Re: Please advise me on C++ coding structure leon de boer9-May-18 5:44 leon de boer 9-May-18 5:44
 Help with C Faith Burnett5-May-18 11:28 Faith Burnett 5-May-18 11:28
 I have been taking the free CS50x course from Harvard and just completed the Mario more comfortable problem. This is my code and I wanted to know how the right side of hashes are left aligned even though the code is the same for both left and right hashes.? To be honest I’m new to this and thought it would simply print out two right aligned pyramids with a gap in between. // Prints bricks, sized as specified by user #include #include int main(void) { // Prompt user for a positive number to use as height of pyramid int h; do { h = get_int("Height: "); } while (h < 0 || h > 23); // Print out this many rows for (int i = 0; i < h; i++) { // Print out this many spaces for (int j = 0; j < h - i; j++) { printf(" "); } // Print left hashes for (int j = 0; j < i + 2; j++) { printf("#"); } // Print gap printf(" "); // Print right hashes for (int j = 0; j < i + 2; j++) { printf("#"); } printf("\n"); } }
 Re: Help with C David Crow5-May-18 17:57 David Crow 5-May-18 17:57
 Re: Help with C Faith Burnett5-May-18 20:08 Faith Burnett 5-May-18 20:08
 How to get value Vaclav_5-May-18 5:41 Vaclav_ 5-May-18 5:41
 Re: How to get value Richard MacCutchan5-May-18 6:47 Richard MacCutchan 5-May-18 6:47
 Re: How to get value Vaclav_6-May-18 4:54 Vaclav_ 6-May-18 4:54
 Re: How to get value Richard MacCutchan6-May-18 5:48 Richard MacCutchan 6-May-18 5:48
 Re: How to get value Vaclav_6-May-18 7:49 Vaclav_ 6-May-18 7:49
 Wrapping c++ Member 129991324-May-18 23:48 Member 12999132 4-May-18 23:48
 Re: Wrapping c++ Richard MacCutchan5-May-18 2:26 Richard MacCutchan 5-May-18 2:26
 Re: Wrapping c++ Member 129991325-May-18 6:06 Member 12999132 5-May-18 6:06
 Re: Wrapping c++ Richard MacCutchan5-May-18 6:42 Richard MacCutchan 5-May-18 6:42
 Message Closed 3-May-18 0:33 Lapmangfpt 3-May-18 0:33
 Re: help: list of list Victor Nijegorodov3-May-18 0:57 Victor Nijegorodov 3-May-18 0:57
 The Breakpoint will not be hit the Source Code is different then the orignal ForNow30-Apr-18 17:08 ForNow 30-Apr-18 17:08
 Re: The Breakpoint will not be hit the Source Code is different then the orignal Richard MacCutchan30-Apr-18 22:32 Richard MacCutchan 30-Apr-18 22:32
 Re: The Breakpoint will not be hit the Source Code is different then the orignal ForNow1-May-18 16:53 ForNow 1-May-18 16:53
 What are the best mocking frameworks available on Linux? Hila Berger29-Apr-18 3:13 Hila Berger 29-Apr-18 3:13
 Last Visit: 23-Jan-19 10:56     Last Update: 23-Jan-19 10:56 Refresh « Prev1...45464748495051525354 Next »