CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com


Type: Posts; User: Ulnarian

Page 1 of 5 1 2 3 4

Search: Search took 0.02 seconds.

  1. Re: Speech synthesis with the internal speaker?

    I tried that already but I couldnt get it too work :(. Any other ideas?
  2. Speech synthesis with the internal speaker?

    I am programming an old-school dungeon crawler and thought it would be cool to get the pc's internal speaker in on the action. While Ive used the BEEP function to nice effect for generating music,...
  3. Correct syntax for for using getline with vectors?

    I'm trying to get my program to read a series of comma delimited values from a file into a vector. However, I am unsure how to actually go about doing this. I've posted my best guess below but it's...
  4. Re: How can I initialize structures AFTER declaration? (begginers question)

    Thanks for the help, Nuzzle, your solution worked perfectly.
  5. Re: How can I initialize structures AFTER declaration? (begginers question)

    While I once understood the "how" of using code tags, I was unable to remember it (16 years is a long time). And, while I did look for a tag button, I was unable to find it and ultimately decided...
  6. Re: How can I initialize structures AFTER declaration? (begginers question)

    Thanks for the help, here's a more simple program I've written just to show the problem I'm running into. I've also listed the error messages that I'm getting from my compiler as comments next to...
  7. How can I initialize structures AFTER declaration? (begginers question)

    I would like to write a program that prompts the user to enter a series of client names which the program will then store in an array of structures. I'm thinking something along the lines of:

  8. Re: Any good resources deadling with simple file input?

    Read from the file to populate the program data structures, do not read keep reading from the file directly. Thanks, I think I got it, I will work with that and see what I can come up with.
  9. Any good resources deadling with simple file input?

    Im trying to make a program that reads input from a file and outputs it on to the screen. For the sake of example, lets assume that I'm making a weekly planner program. I would like to have the user...
  10. Two newbie questions regarding the vector class

    Hey all,

    Just for fun, I've decided to try to design a card game. However, as I'm pretty new at this, I'm taking baby steps. Anyways, the problem I have right now is how to generate 5 unique,...
  11. Replies

    Re: Beginner's question regarding arrays

    Thanks everyone. I ended up using Monarch's alternative answer as my vector knowledge is pretty much non-existent.
  12. Replies

    Beginner's question regarding arrays

    I'm making a "war" style card game. For the sake of explanation, assume that there are only 10 available cards valued 1 through 10. At the start of the game, 5 of the cards will be randomly given...
  13. Replies

    Whats the best version of cin to use?

    If I want to pause the program until the user hits the ENTER key, what is the best version of cin to use. Also, I'd like to have the input queue cleared afterwards.


    Sorry for the...
  14. Replies

    Re: String class question

    Ah, thanks :)
  15. Replies

    String class question

    Say I have the following code:

    string dog;
    char cat;
    cin >> cat;

    if (dog.find(cat)!=string::npos)
    cout << "Yup, " << cat << " is in the dog string";
  16. Replies

    Re: Basic C++ Help?

    Ouch! That's one sadistic teacher :( Sorry, don't think I could teach you how to do all that stuff in one night.
  17. Re: Mutiple cases for the same block of a switch code?


    Wow, thanks. I've never heard of sstream before, but I just looked into that and it worked perfectly. Now, if only I had known that before I wrote about 2 hours worth of cases :)

  18. Re: Mutiple cases for the same block of a switch code?

    Hey, thanks man :)

    Yeah, I hear you on the elegance factor. Having to code all the possible combinations is going to take some serious manpower. I suppose smarter people than myself have already...
  19. Mutiple cases for the same block of a switch code?

    Is there an easy way to have multiple cases execute the same block of code? For example, part of my code asks the user to insert three numbers as shown below.

    cin >> x;

    switch (x)

  20. Replies

    Re: Horizontal output?

    Awesome, thanks. I'll see what I can do :)
  21. Replies

    Horizontal output?

    So I'm writing a dice game that displays 5 dice on the screen at one time. Part of my code looks like this:


    This function...
  22. Constant array question? (Begginers question)

    Hey all, just for fun I'm designing a game that is similar to Yahtzee. In order to store the values of the players rolls, I'm envisioning an integer array something like:

    int roll_value[10];
  23. Replies

    Multi-character characters?

    Is there a way to make the following possible with only a character type?

    char ch='10';

    Thanks :)
  24. Replies

    Re: Tic-tac-toe help

    Thanks man, that seems to do the trick (and kinda leaves me scratching my head at the same time).

    Going one step further, whats the correct way to say the following in C++:

    While (a & b & c are...
  25. Replies

    Tic-tac-toe help

    Hey all, so I'm making the obligatory Tic-Tac-Toe game. While it's mostly completed, I've hit a slight snag.

    Basically, I've assigned each grid of the board to a character variable. For example,...
Results 1 to 25 of 103
Page 1 of 5 1 2 3 4

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)