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,...
Type: Posts; User: IM back!
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,...
why not use ints? :confused:
thanks for caching that:
still dosent work tho heres the new output:
pos = 12
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...
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...
: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
void mplayer_thread( FILE *&mpipe )
{
mpipe = popen("mplayer -slave -quiet -idle &> /dev/null" , "w");
}
class mplayer_interface
{
private:
FILE *mp_pipe;
boost::mutex...
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...
why dose this now segfault?
#include <string.h>
#include <iostream>
#include <fstream>
#include <boost/thread.hpp>
void mplayer_thread( FILE *&mpipe )
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...
anyone with c++ and mplayer knowledge know whats wrong with this?
#include <string.h>
#include <iostream>
#include <fstream>
class mplayer_interface
{
private:
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...
Why dose this not work:
char array[20][26];
ifstream arrayfile ( name );
if (arrayfile.fail())
{
cout << "Problems opening "<<name<< endl;
kill (1);
}
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*...
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
deleted
int allegro ( int srcx, int srcy )
{
allegro_init();
install_keyboard();
install_timer()
LOCK_VARIABLE ( speed_counter );
LOCK_FUNCTION ( increment_speed_counter )
install_int_ex (...
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...
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...
OK thanks now it works i simply defined aa like this int aa = -1;
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
int aa;
int bb;
string name;
char input[1000];
char output[1000];
void a
{
while (aa != 100)
{
deleted
why dose this only give me:
ouput is:
not
Output is: <somthing here>
why dose this no compile?
#include <stdlib.h>
#include <vga.h>
int main(void)
{
vga_init();
vga_setmode(G320x200x256);
string name;
cin>>name;
ofstream name_file ( name );
how would you do the above, as it obviously doesn't work.
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?