Search:

Type: Posts; User: LiKWiD

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: string issue

    by LiKWiD
    Replies
    4
    Views
    1,366

    using namespace std; string mine; ifstream...

    using namespace std;

    string mine;

    ifstream myFile("file.txt", ios::in);

    getline(myFile, mine, '\n');
  2. Thread: Char

    by LiKWiD
    Replies
    22
    Views
    1,918

    As a side note, strings use the format ...

    As a side note, strings use the format



    getline(cin, blah, '\n');


    rather than
  3. Replies
    10
    Views
    1,971

    remove(filename.c_str()); rename("temp.ini",...

    remove(filename.c_str());
    rename("temp.ini", filename.c_str());


    It wasn't working in my proggie at first because I hadn't closed the files before trying to rename/remove them. Everything works...
  4. Thread: Char

    by LiKWiD
    Replies
    22
    Views
    1,918

    If you want to simply make it unreadable by your...

    If you want to simply make it unreadable by your friends, output the characters to your file as mrafcho001 said, then create a program to 'decode' the same. I believe you can find what a space is by...
  5. Replies
    10
    Views
    1,971

    remove() and rename()

    Well, first of all I tried using these in my function and it doesn't seem to do anything. That, I'm sure, can be worked out. However, if I'm not mistaken these are C functions. I've searched and...
  6. Thread: Char

    by LiKWiD
    Replies
    22
    Views
    1,918

    Well, I'm not sure that your question was worded...

    Well, I'm not sure that your question was worded extremely well, but of course a character doesn't become an integer just because.
  7. Replies
    10
    Views
    26,458

    Thanks for all the help. I learned a lot messing...

    Thanks for all the help. I learned a lot messing with arrays, but in the end I looked at my code and thought I should rewrite it with STL strings. It is much easier to deal with (IMO) and so far it...
  8. Replies
    10
    Views
    26,458

    Well, that didn't take long. I am not sure how to...

    Well, that didn't take long. I am not sure how to add a character to my string. I'm trying to add aline[y] to string div_check.



    char div_check[30];
    . . .
    div_check += aline[y]; //also...
  9. Replies
    10
    Views
    26,458

    I changed ofstream ini_write...

    I changed



    ofstream ini_write ((strcat("temp",filename)), ios::out);


    to
  10. Replies
    10
    Views
    26,458

    Well, my program compiles right, but crashes when...

    Well, my program compiles right, but crashes when I try to run it.

    *Long Code Ahead*


    #include <cstdlib>
    #include <iostream>
    #include <fstream>
    #include <cstring>
  11. Replies
    10
    Views
    26,458

    Sweet, works now. Thanks. I guess I don't...

    Sweet, works now. Thanks. I guess I don't understand how they work too terribly well. I'm also having trouble appending characters to the end of a string. This is what I have:


    ...
  12. Replies
    10
    Views
    26,458

    invalid conversion from 'char' to 'const char*'

    I am writing a function, and I'm getting the error "invalid conversion from 'char' to 'const char*'" when I try to compile. Any help would be appreciated. :)


    char aline[125];
    char sline[125];...
  13. Replies
    1
    Views
    974

    Having file i/o trouble

    #include <stdio.h>
    #include <stdlib.h>
    #include <iostream>
    #include <fstream>

    using std::cout;
    using std::cin;
    using std::ifstream;
    using std::ofstream;
    using std::ios;
  14. Replies
    6
    Views
    3,415

    Anybody know why I'd be getting a linker error...

    Anybody know why I'd be getting a linker error like that?
  15. Replies
    6
    Views
    3,415

    Ok, I reinstalled all of GTK+ and gtkmm, and it...

    Ok, I reinstalled all of GTK+ and gtkmm, and it gets farther in compilation this time. However, I'm still getting errors. This time from the linker:



    [Linker error] undefined reference to...
  16. Replies
    6
    Views
    3,415

    It gives me errors such as: 29 In file...

    It gives me errors such as:


    29 In file included from C:/dev-cpp/include/gtkmm/include/gtkmm-2.0/gtkmm.h
    25 C:\dev-cpp\include\gtkmm\include\gtkmm-2.0\glibmm.h glibmmconfig.h: No such file...
  17. Replies
    6
    Views
    3,415

    Problems installing GTKmm

    Ok, I realize this isn't directly a C++ problem, but it concerns it, and I'm not sure where else to get help on it. I'll jump right to my question: I am trying to setup GTK+ (2.4 I believe) to work...
  18. Replies
    7
    Views
    1,418

    So, do I have to setup the Windows .. "stuff"?...

    So, do I have to setup the Windows .. "stuff"? (I've tried Windows programming, but never done much with it since you had to add all the code at the beginning to set it up.) i.e., What do I need to...
  19. Replies
    7
    Views
    1,418

    How do I change my program's icon?

    I would like to know how to change the icon of my program (console application) from the default whiteboard-thing to an icon of my choice. Any 'n all help is appreciated. Thanks.


    --mr0ldie
  20. Thread: n00b help

    by LiKWiD
    Replies
    10
    Views
    1,147

    it worked fine when I compiled it...

    it worked fine when I compiled it...
  21. Replies
    16
    Views
    2,180

    Well, I removed rem when I changed it up a bit. ...

    Well, I removed rem when I changed it up a bit. I had it in there before to basically discard a couple extra variables the person may have entered (since my program can only calculate 4 variables)....
  22. Replies
    16
    Views
    2,180

    Ok, I changed up a lot of the code. Thanks to...

    Ok, I changed up a lot of the code. Thanks to froggy I have...



    const char add = '+';
    const char subtract = '-';
    const char multiply = '*';
    const char divide = '/';
  23. Thread: a big problem

    by LiKWiD
    Replies
    3
    Views
    1,227

    You will also need to add cin.ignore() after...

    You will also need to add cin.ignore() after cin>>choice. It will get rid of the return at the end of the string, so your first getline in the IF (whichever is executed) won't be empty.
  24. Replies
    16
    Views
    2,180

    Hey, thanks for the suggestions. If I use a...

    Hey, thanks for the suggestions.

    If I use a switch, I still have to set up an IF similar to what I have to tell it which case to use, correct?

    Ahh, pointers. I hadn't thought to use those....
  25. Replies
    16
    Views
    2,180

    Sorry, I don't mean to waste anybody's time. I...

    Sorry, I don't mean to waste anybody's time. I really don't have a problem, I'm simply asking for suggestions if people have the time...


    --LiKWiD
    Becoming un-noobified one day at a time.
Results 1 to 25 of 27
Page 1 of 2 1 2