Search:

Type: Posts; User: sikamikaniko

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    11
    Views
    2,294

    main() { ofstream out; out.open(filename,...

    main()
    {
    ofstream out;
    out.open(filename, ios::nocreate | iso::out);
    ...
    ...
    ...
    out.close();
    ...
    return 0;
  2. Replies
    12
    Views
    2,499

    The autoexec.bat isn't good idea. There are many...

    The autoexec.bat isn't good idea. There are many methods to skip the lines in it. The bios is good, but I think codefx wanted some program to put it at the start of windows - before everything. Like...
  3. Password

    If You want to make some kind of code, might be this will help you :)
    I have the program. How to send it to you?
  4. Replies
    7
    Views
    1,297

    #include main() { char ln[256];...

    #include<iostream.h>
    main()
    {
    char ln[256];
    cin >> ln;
    cout << ln;
    return 0;
    }
  5. Replies
    7
    Views
    1,297

    Yes. Try this: cin >> string1; cout

    Yes. Try this:


    cin >> string1;
    cout << string1;
  6. Replies
    6
    Views
    1,173

    or in case to cont how many of each mark there...

    or in case to cont how many of each mark there are, just in the while add IFs. Also create more integers for each mark:


    int punkt=0;
    int comma=0;
    ...
    while...
    {
    if(letter==',')
    ...
  7. Replies
    6
    Views
    1,173

    I suggest to open the file and get chars like...

    I suggest to open the file and get chars like this:



    char letter;
    int count=0;

    while(ptr_file.get(letter))
    {
    if(letter=='.' || letter==',' || letter=='!' || letter=='?')
  8. Replies
    4
    Views
    1,223

    yes, the function is returning only one variable....

    yes, the function is returning only one variable. But it depends on the case which one to return. It will return only the one where the IF operator is true or if no IFs are tru, then it will return...
  9. Replies
    5
    Views
    1,704

    You have to set srand(time(NULL)); to NULL in...

    You have to set srand(time(NULL)); to NULL in every loop in case to get different random numbers.
    Here's a code, that is working perfectly in one of my programs:


    ln=countln(ln); //...
  10. Replies
    6
    Views
    1,774

    I am doing it like this:

    char get;
    ofstream file_ptr;
    file_ptr.open(file, ios::out);
    while(file_ptr.get(get))
    {cout << get;}
    file_ptr.close();

    Hope that was what you was looking for :)
  11. Replies
    7
    Views
    1,249

    Hi! There is another way to do that. First, why...

    Hi! There is another way to do that. First, why don't you use for instead while?
    so:

    while (isalpha(array[i]))
    cout << "Don't enter letters" << endl;

    Try this:

    if(isalpha(array[i])==0)...
  12. Replies
    3
    Views
    1,649

    10x anyway :)

    10x anyway :)
  13. Replies
    3
    Views
    1,649

    How to get Date

    Hi all. If anyone knows how to get the date and store it in a char, pls tell me.
  14. Use "for" instead "do/while" : do {...

    Use "for" instead "do/while" :


    do
    {
    i[count]=99999;
    count++;
    }
    while (count<30);
  15. Just an advice

    Use "for" instead "do/while" :
    [code]
    do
    {
    i[count]=99999;
    count++;
    }
    while (count<30);
    [\code]
  16. Replies
    5
    Views
    1,006

    What is the problem?

    So, first of all - this kill. U never use it.
    Also, include string.h (I have used bc++ 3.1)
    and at the end, I had no problems using your program. It asked me 10 times for my name, and then it...
  17. I think, that if you have many actions with...

    I think, that if you have many actions with reading and writing to a file, than it is better to separate those actions in different functions. But in this case it is not important. Also, if You make...
  18. Might be like this:

    while(get(text))
    { cout << text; }

    Try it :)
  19. Yes

    So, that is the Idea. But, if You want somth else, please reply :)
  20. ?

    You want :
    - the user to input a number and instead of digits the user should see * ?
  21. Replies
    11
    Views
    3,616

    The idea...

    ... is to store the input digits in an array. U can do it without pointers and such. But if you don't know the number of the inputs, then create a dynamic array. See the tutorial N14 I think on this...
  22. Replies
    6
    Views
    909

    If you want to do this ...

    to output like this {1,2,3}
    do it
    cout<<"{"<<arr[0]<<"," <<arr[1] etc. :)
  23. Thread: Hehe =)

    by sikamikaniko
    Replies
    18
    Views
    1,993

    Talking abt compilers ...

    Tell me how to count the CPU cycles :) Please, ofcourse :)
  24. Replies
    9
    Views
    1,121

    hm...

    ask() should return 0 loke this:
    <code>

    if(number_of<1)
    {cout<<"Invalid input"; return 0;}
    return num_of;
    </code>

    :) Don't go farmering, pick something easier: beer/coffee and TV like me:)
  25. Replies
    3
    Views
    1,690

    The problem is:

    You shoud declare the size of the array.
Results 1 to 25 of 28
Page 1 of 2 1 2