6 Topics

Member Avatar for
Member Avatar for DS9596

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" …

Member Avatar for DS9596
0
1K
Member Avatar for Labdabeta

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) { …

Member Avatar for mike_2000_17
0
447
Member Avatar for herious89

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 …

Member Avatar for rubberman
0
918
Member Avatar for Labdabeta

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?

Member Avatar for mike_2000_17
1
152
Member Avatar for Mahkoe

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 …

Member Avatar for Mahkoe
0
179
Member Avatar for frank731tr

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 …

Member Avatar for jonsca
0
295

The End.