Search:

Type: Posts; User: davewang

Search: Search took 0.01 seconds.

  1. How to prevent cursor from going to newline in c++

    If you prompt a user to enter a value say;
    "Enter Salary: $"
    Then the user enters 500.00 and strikes the enter key.
    The cursor then goes to the next line.
    And this is what I want to prevent
    I...
  2. Replies
    11
    Views
    2,044

    thanks for the suggestion guys! just a curious...

    thanks for the suggestion guys!
    just a curious question, random_shuffle() does what? is it efficient to random a array?
  3. Replies
    11
    Views
    2,044

    #include #include #include...

    #include <iostream>
    #include <cstdlib>
    #include <ctime>
    #define MAX 20

    void randomvalues(int *l, int n) {
    srand(time(0));
    ...
  4. Replies
    11
    Views
    2,044

    Random Generation

    Hi guys!

    I'm writing a program that involves with random generation. Basically, I want to randomly generate a range of values, lets say from 1 to 10 to an array of 10 element. Another thing is I...
  5. Replies
    3
    Views
    2,100

    it's hard to explain but I really need that s1...

    it's hard to explain but I really need that s1 value in the member function print.
    s1 is an object that refer to one of my string object in the main function, i just wanna print its value in the...
  6. Replies
    3
    Views
    2,100

    Calling argument of member function

    How can I call an argument of a member function from another member function?

    Here is the two prototypes of member function from a class:

    int my_string::strcmp(const my_string& s1);

    void...
  7. Replies
    1
    Views
    1,202

    Creating class object

    Hi again,

    I'm self-learning about class and member function now. One curious question is can i create an object of a class in the member function of another class?
  8. Replies
    6
    Views
    1,576

    i see, thanks

    i see, thanks
  9. Replies
    6
    Views
    1,576

    Copy Constructor in Class

    Hi everybody,

    I'm having a really hard time learning about copy constructor. I have tried to read several books about copy constructor but seems like i'm stuck or something.
    For example: (the...
  10. Replies
    3
    Views
    1,399

    thank you! i found it very useful, and one more...

    thank you! i found it very useful, and one more question, is it possible to prevent the same random number printing out? because if the same random number pop up , i'm sure that some vocabularies...
  11. Replies
    3
    Views
    1,399

    Print Randomly!

    Hi everyone! i got an idea, but not sure it is possible to make it in C or not. Here the thing:
    I want to create a program for testing vocabulary. I think that i can just simply apply the printf...
  12. Replies
    5
    Views
    12,922

    I got error "coflicting types for 'calcavg', and...

    I got error "coflicting types for 'calcavg', and conflicting types for 'outresults' "
  13. Replies
    5
    Views
    12,922

    Error! Conflicting Types

    Hi everyone! last night i got a headache just because of this error "Conflicting Types". I try to play around with my code in hope that it gonna fix the problem, but seem useless. Here is my program:...
  14. Replies
    13
    Views
    20,235

    yo got my mind laserlight! that's something that...

    yo got my mind laserlight! that's something that i'm struggling on! now, things is clear! probably have to consider back to set an appropriate value for the array! thanks guys anyway!
  15. Replies
    13
    Views
    20,235

    all right guys! thanks for the tips and advice!

    all right guys! thanks for the tips and advice!
  16. Replies
    13
    Views
    20,235

    Set ARRAY to INFINITY!

    hello! i just have a quick question about array. Is there anyway i can set my array declaration [ ] to infinity? because i don't want to set a huge number in the array declaration like [10000000]
  17. Replies
    13
    Views
    3,081

    all right! thank everybody very much! actually...

    all right! thank everybody very much! actually i'm just a beginner for this! reading u guys discussion, i'm really get into it even i dont really understand it. Probably later, i will understand well...
  18. Replies
    13
    Views
    3,081

    trouble with fgets() !

    here is my problem! i'm trying to intput a string using fget() method. The problem is it doesn't allow me to do it. Here is what i did:


    #include <stdio.h>


    int main()
    {
    int...
  19. Replies
    9
    Views
    2,930

    wow! thank you for your example MK27. Seriously,...

    wow! thank you for your example MK27. Seriously, i have never learned it in class. The instructor just told us to use scanf and printf to write this program! i never thought that it gonna turn in so...
  20. Replies
    9
    Views
    2,930

    I tried it, and it let me type in information for...

    I tried it, and it let me type in information for the hobbies, but this time it got crash again, and was unable to print out the form
  21. Replies
    9
    Views
    2,930

    may i ask" what do mean by set aside strorage? "...

    may i ask" what do mean by set aside strorage? " sorry, because i'm just a freshman to the C programming language!
    and can you point out what did i code wrong about it? cuz i'm wondering. I have try...
  22. Replies
    9
    Views
    2,930

    Problem with printf and scanf!

    Hi everybody!
    I have a project just received by today. It is pretty simple. Basically, just write a program about filling an information form and then print it out. (Using scanf and printf only)...
Results 1 to 22 of 22