Ok, I want a C++ equivalent of the following C code:
#include <stdio.h>
int main()
{
char * location;
Type: Posts; User: Ham
Ok, I want a C++ equivalent of the following C code:
#include <stdio.h>
int main()
{
char * location;
It's not a mistake; I have all my string declarations at the beginning of the program, and those variables (e.g. location) are not set until further down the program during run-time.
I found a...
I got around the problem using printf instead because the following wouldn't work:
#include <iostream> //basic io
#include <string> //obvious
using namespace std;
int main()
Thanks, that helps.
Please explain
In web programming langauges like php, you can put variable names in your string declaration like this:
var location = "Spain"
var myString = "The rain in $location is falling on the plain"
...
My input file is:
0
0
3
0
+9999999999
+8000000001
+1001002003
-8003000000
How do you use fscanf to read in a string into a character array, say buf, INCLUDING the spaces???
Nice try, but that didn't work for numbers like +9999999999. Searching the board didn't really help. Any takers?
Say I have a string (str) that contains a very long signed integer, like +1234567890 or -1234567890. How can I convert this string to an integer value that will preserve all 10 values (including the...
I have a BST which takes in an arbitrary list of words, and outputs the occurrences of each word in alphabetical order:
1. What is the height of the tree given that the words are inserted in...
This is probably a very stupid question. I made a working program that reads in a word list and spits out all the anagram classes in the word list in alphabetical order. For example, if the program...
Can someone tell me which type of sort is good for sorting a singly linked list holding character strings in their nodes? Some sorts are better than others in different situations but I keep hearing...
Hi, I wrote this function to calculate powers, like x^n. It works for integer values, but I can't get it to calculate roots, like root 5 = 5^(1/2).
Can someone tweek this a little bit for me? thx...