Search:

Type: Posts; User: Ham

Search: Search took 0.02 seconds.

  1. Thread: dynamic strings

    by Ham
    Replies
    20
    Views
    2,025

    Ok, I want a C++ equivalent of the following C...

    Ok, I want a C++ equivalent of the following C code:




    #include <stdio.h>

    int main()
    {
    char * location;
  2. Thread: dynamic strings

    by Ham
    Replies
    20
    Views
    2,025

    It's not a mistake; I have all my string...

    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...
  3. Thread: dynamic strings

    by Ham
    Replies
    20
    Views
    2,025

    I got around the problem using printf instead...

    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()
  4. Thread: dynamic strings

    by Ham
    Replies
    20
    Views
    2,025

    Thanks, that helps.

    Thanks, that helps.
  5. Thread: dynamic strings

    by Ham
    Replies
    20
    Views
    2,025

    Please explain

    Please explain
  6. Thread: dynamic strings

    by Ham
    Replies
    20
    Views
    2,025

    dynamic strings

    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"
    ...
  7. Replies
    4
    Views
    1,317

    My input file is: 0 0 3 0 +9999999999...

    My input file is:

    0
    0
    3
    0
    +9999999999
    +8000000001
    +1001002003
    -8003000000
  8. Replies
    4
    Views
    1,317

    quick fscanf question...

    How do you use fscanf to read in a string into a character array, say buf, INCLUDING the spaces???
  9. Replies
    6
    Views
    2,159

    Nice try, but that didn't work for numbers like...

    Nice try, but that didn't work for numbers like +9999999999. Searching the board didn't really help. Any takers?
  10. Replies
    6
    Views
    2,159

    Converting string to integer...

    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...
  11. Replies
    1
    Views
    2,764

    Newbie questions regarding binary search trees

    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...
  12. Replies
    2
    Views
    2,179

    HELP!!! Big-O of my anagram program

    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...
  13. Replies
    1
    Views
    1,809

    Quick question on sorting a singly linked list

    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...
  14. Replies
    2
    Views
    1,429

    Need help in calculating powers/roots

    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...
Results 1 to 14 of 14