6 Topics
|
|
I'm not sure if I'm doing this part correctly, the part where I have to make it all lower case then to all upper case, then just first name. #include <iostream> #include <cstring> #include <stdio.h> using namespace std; int main() { char a[3][14] = { "Barack ", "H", " Obama" … |
|
Hello, I was recently looking through some of my code and found what I believe to be a memory leak. It is in a function that appends two strings and I am not sure how to resolve it. Here is the function: const char *strapp(const char *str,const char *s) { … |
|
I'm trying to extract the value of the coeffecients and the exponent from a polynomial. I have already succeeded in extracting the coeffients using strtok. I applied the same concept to find the exponent, but I don't know how to use strtok to extract the string AFTER the delimiters or … |
|
I know that this [ICODE]#define QUOTE(X) #X[/ICODE] turns X into a c-string version of whatever is passed to it. my question is if there is a way to do this in reverse ie: [ICODE]#define DEQUOTEANDCALLFUNCTIONORCLASSWITHGIVENNAME(X) (X#)()[/ICODE] is this possible? |
|
I've been coding in c++ for a while now, and I use string variables quite a lot. One day, I stumbled upon a char* which can also be used to "store" a string of characters, and it's been bothering me ever since that I don't really know what a string … |
|
I would like to convert a C++ string that the user inputs to a c string. The problem is I have no idea how long the c++ string will be and i know the c string has to have one extra space for \n. Is there a way to apply … |
The End.