Click here to Skip to main content
13,664,842 members

C / C++ / MFC

 
Questionconst char [] and char[] difference question Pin
focusdoit10-May-18 14:26
memberfocusdoit10-May-18 14:26 
QuestionRe: const char [] and char[] difference question Pin
David Crow10-May-18 17:22
memberDavid Crow10-May-18 17:22 
AnswerRe: const char [] and char[] difference question Pin
Richard MacCutchan10-May-18 21:25
protectorRichard MacCutchan10-May-18 21:25 
AnswerRe: const char [] and char[] difference question Pin
Victor Nijegorodov10-May-18 23:03
memberVictor Nijegorodov10-May-18 23:03 
GeneralRe: const char [] and char[] difference question Pin
samzcs11-May-18 2:24
membersamzcs11-May-18 2:24 
QuestionPlease advise me on C++ coding structure Pin
Vaclav_9-May-18 4:24
memberVaclav_9-May-18 4:24 
AnswerRe: Please advise me on C++ coding structure Pin
leon de boer9-May-18 4:44
memberleon de boer9-May-18 4:44 
QuestionHelp with C Pin
Faith Burnett5-May-18 10:28
memberFaith Burnett5-May-18 10: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 <cs50.h>
#include <stdio.h>

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");
}
}
AnswerRe: Help with C Pin
David Crow5-May-18 16:57
memberDavid Crow5-May-18 16:57 
GeneralRe: Help with C Pin
Faith Burnett5-May-18 19:08
memberFaith Burnett5-May-18 19:08 
QuestionHow to get value Pin
Vaclav_5-May-18 4:41
memberVaclav_5-May-18 4:41 
AnswerRe: How to get value Pin
Richard MacCutchan5-May-18 5:47
protectorRichard MacCutchan5-May-18 5:47 
GeneralRe: How to get value Pin
Vaclav_6-May-18 3:54
memberVaclav_6-May-18 3:54 
GeneralRe: How to get value Pin
Richard MacCutchan6-May-18 4:48
protectorRichard MacCutchan6-May-18 4:48 
GeneralRe: How to get value Pin
Vaclav_6-May-18 6:49
memberVaclav_6-May-18 6:49 
QuestionWrapping c++ Pin
Member 129991324-May-18 22:48
memberMember 129991324-May-18 22:48 
AnswerRe: Wrapping c++ Pin
Richard MacCutchan5-May-18 1:26
protectorRichard MacCutchan5-May-18 1:26 
GeneralRe: Wrapping c++ Pin
Member 129991325-May-18 5:06
memberMember 129991325-May-18 5:06 
GeneralRe: Wrapping c++ Pin
Richard MacCutchan5-May-18 5:42
protectorRichard MacCutchan5-May-18 5:42 
QuestionMessage Closed Pin
2-May-18 23:33
memberLapmangfpt2-May-18 23:33 
AnswerRe: help: list<struct> of list<string> Pin
Victor Nijegorodov2-May-18 23:57
memberVictor Nijegorodov2-May-18 23:57 
QuestionThe Breakpoint will not be hit the Source Code is different then the orignal Pin
ForNow30-Apr-18 16:08
memberForNow30-Apr-18 16:08 
AnswerRe: The Breakpoint will not be hit the Source Code is different then the orignal Pin
Richard MacCutchan30-Apr-18 21:32
protectorRichard MacCutchan30-Apr-18 21:32 
GeneralRe: The Breakpoint will not be hit the Source Code is different then the orignal Pin
ForNow1-May-18 15:53
memberForNow1-May-18 15:53 
QuestionWhat are the best mocking frameworks available on Linux? Pin
Member 1362401229-Apr-18 2:13
memberMember 1362401229-Apr-18 2:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Cookies | Terms of Service
Web01-2016 | 2.8.180810.1 | Last Updated 17 Aug 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid