My program below compiles perfectly. But the result is not as expected. That is quite common. The program works fine when the data(&temp) is of type char, but problem arises when it is of type int....
Type: Posts; User: sayz0
My program below compiles perfectly. But the result is not as expected. That is quite common. The program works fine when the data(&temp) is of type char, but problem arises when it is of type int....
Hello anybody out there. I have a problem understanding the function to convert string object to null-terminated string.
The function looks something like:
const char *c_str()const;
my...
sorry for the confusing question.
The below program works:
#include <stdio.h>
#include <iostream>
#include <map>
using namespace std;
int main() {
I was trying to initialise an associative container (map) in a function, but couldn't. Seems like whatever is initialised in the function stays in the function. That's natural for a function. So, how...