I'm reading a book on ASP.NET Core 2.0 and in one of the exercises it asks to add an interface template by right clicking on a folder and selecting Add new item. The interface type is not showing up. I've done some searching and couldn't find much on it. Can anyone help?
doughyi8u
Posts
-
interface template not showing up in visual studio 2017 community -
using toupper to uppercase an array indexI'm trying to uppercase the second word in a string of two words (a first and last name).
int index;
string name = "Jeffrey steinberg";index = name.IndexOf(' ');
name = name[index + 1].ToUpper();The toupper function isn't working though. How would I uppercase just the s in steinberg?
-
problems returning/printing poinerI understand that the reason the ret variable will not print (it's at the end of the string when destination is passed) but can't figure out how to return destination out of the my_strcpy() function. I can make this work using array notation but not pointer arithmetic. Here's the code in question:
#include #include #include char *my_strcpy(char *, const char *);
int
main()
{
char *strA = "This is a string";
char *strB;
char *ret;strB = malloc(strlen(strA)+1); ret = my\_strcpy(strB, strA); puts(ret); puts(strB); free(strB); return 0;
}
char *my_strcpy(char *destination, const char *source)
{
while (*source != '\0')
{
*(destination++) = *(source++);
}
*destination = '\0';
return destination;
}