Search:

Type: Posts; User: IM back!

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    12
    Views
    6,345

    thanks, still no good tho bool...

    thanks, still no good tho



    bool ci_equal(const char ch1, const char ch2)
    {
    return toupper((unsigned char)ch1) == toupper((unsigned char)ch2);
    }

    size_t ci_find(const std::string& str1,...
  2. Replies
    12
    Views
    6,345

    why not use ints? :confused: thanks for...

    why not use ints? :confused:



    thanks for caching that:

    still dosent work tho heres the new output:


    pos = 12
  3. Replies
    12
    Views
    6,345

    small debug program: bool ci_equal(const...

    small debug program:


    bool ci_equal(const char ch1, const char ch2)
    {
    return toupper((unsigned char)ch1) == toupper((unsigned char)ch2);
    }

    size_t ci_find(const std::string& str1, const...
  4. Replies
    12
    Views
    6,345

    Find whole word in string, case insensetive.

    im trying find a word in a string but Mach the whole word only ( ex. "pan" should not Mach "expansive" but should Mach "PAN" ). heres what i have so far:


    bool ci_equal(const char ch1, const char...
  5. Replies
    10
    Views
    6,552

    :cool:that worked! Thank you. heres the final...

    :cool:that worked! Thank you.

    heres the final code just in case someone has the same problem:


    #include <string.h>
    #include <iostream>
    #include <fstream>

    class mplayer_interface
  6. Replies
    10
    Views
    6,552

    void mplayer_thread( FILE *&mpipe ) { ...

    void mplayer_thread( FILE *&mpipe )
    {
    mpipe = popen("mplayer -slave -quiet -idle &> /dev/null" , "w");
    }

    class mplayer_interface
    {
    private:
    FILE *mp_pipe;
    boost::mutex...
  7. Replies
    10
    Views
    6,552

    you mean the "." in ./data/.currentplaylist? you...

    you mean the "." in ./data/.currentplaylist? you need it. this is on linux, so /data/.currentplaylist means that data is a folder in root (wrong). and the "." in .currentplaylist is allso neaded, in...
  8. Replies
    10
    Views
    6,552

    why dose this now segfault? #include...

    why dose this now segfault?



    #include <string.h>
    #include <iostream>
    #include <fstream>
    #include <boost/thread.hpp>

    void mplayer_thread( FILE *&mpipe )
  9. Replies
    10
    Views
    6,552

    So i would have to create a thread for that, darn...

    So i would have to create a thread for that, darn im not so good at that.
    I'd use boost::thread for that but thread() only accepts void functions so i would have to create a new function, somthing...
  10. Replies
    10
    Views
    6,552

    problem with c++, mplayer interface.

    anyone with c++ and mplayer knowledge know whats wrong with this?


    #include <string.h>
    #include <iostream>
    #include <fstream>

    class mplayer_interface
    {
    private:
  11. Replies
    2
    Views
    1,146

    thanks it works better now but i now it turns the...

    thanks it works better now but i now it turns the array by 90 degrees? what gives:



    void array_to_file ( int array[20][26], char name[50] )
    {
    ofstream arrayfile ( name );
    if...
  12. Replies
    2
    Views
    1,146

    Help with streams

    Why dose this not work:

    char array[20][26];
    ifstream arrayfile ( name );
    if (arrayfile.fail())
    {
    cout << "Problems opening "<<name<< endl;
    kill (1);
    }
  13. Replies
    5
    Views
    1,299

    converting char to int

    hello

    I want to convert a char array containing only numbers like char aa[50]="123456789" into a int with the value 123456789.

    i thought that i could to it by simply going: number in place*...
  14. Replies
    8
    Views
    2,494

    its unessesary i removed it in the other ifs...

    its unessesary i removed it in the other ifs aswell.



    im new to this so i dont know any better way to do things. im open to suggestions.


    dead on
  15. Replies
    8
    Views
    2,494

    deleted

    deleted
  16. Replies
    8
    Views
    2,494

    allegro, small problem

    int allegro ( int srcx, int srcy )
    {

    allegro_init();
    install_keyboard();
    install_timer()
    LOCK_VARIABLE ( speed_counter );
    LOCK_FUNCTION ( increment_speed_counter )
    install_int_ex (...
  17. Replies
    19
    Views
    2,501

    I do indeed use cin>>input;, but if i do this: ...

    I do indeed use cin>>input;, but if i do this:


    cin>>input;
    cout<<input;

    it comes with spaces, so I dont understand what you mean, but ill try cin.getline( input, 100, '\n' )

    EDIT: it...
  18. Replies
    19
    Views
    2,501

    thats because that is a part of a small app, I...

    thats because that is a part of a small app, I could have done it like this. operation(char input[100], int aa) but i find global variables easyer in this case.

    now one last qusetion: why dose...
  19. Replies
    19
    Views
    2,501

    OK thanks now it works i simply defined aa like...

    OK thanks now it works i simply defined aa like this int aa = -1;
  20. Replies
    19
    Views
    2,501

    OK thank you all, I still have a lot to learn :)...

    OK thank you all, I still have a lot to learn :) , I made some corrections. now how do I get the to print the output
  21. Replies
    19
    Views
    2,501

    int aa; int bb; string name; char input[1000];...

    int aa;
    int bb;
    string name;
    char input[1000];
    char output[1000];

    void a
    {
    while (aa != 100)
    {
  22. Replies
    19
    Views
    2,501

    why dose this give me

    deleted

    why dose this only give me:
    ouput is:
    not
    Output is: <somthing here>
  23. Replies
    1
    Views
    2,319

    simple program with svgalib = no compile?

    why dose this no compile?


    #include <stdlib.h>
    #include <vga.h>

    int main(void)
    {
    vga_init();
    vga_setmode(G320x200x256);
  24. Replies
    1
    Views
    1,277

    strings & ofstream

    string name;
    cin>>name;
    ofstream name_file ( name );


    how would you do the above, as it obviously doesn't work.
  25. Thread: help

    by IM back!
    Replies
    12
    Views
    1,425

    thank you all for helping me but i still have one...

    thank you all for helping me but i still have one ???. how do i catsh false inputs? EX. if the user types gt were my app asks for the users age how do i have my app reject the input?
Results 1 to 25 of 29
Page 1 of 2 1 2