I think it may be like piaf (palm thing), in that when you press "compile and run" it runs the last program it ran -- not the current one.
Or maybe not. I wouldn't know about dev-C++ - I use...
Type: Posts; User: w00tw00tkab00t
I think it may be like piaf (palm thing), in that when you press "compile and run" it runs the last program it ran -- not the current one.
Or maybe not. I wouldn't know about dev-C++ - I use...
yeah that's what i tried to do the other day (using termcap)
i'm just using this in case my program is run with -v... thought progress bars would be cool :-D
anybody know a really good termcap...
oops yeah lol pbar originally returned a char*
still.... how do i manage to do it without setting them in advance?
yeah, apparently that's it.
#include <stdio.h>
#include <stdlib.h>
int main() {
printf("%d\n", atoi(getenv("COLUMNS")));
return 0;
}
Ok, so this is supposed to display a wget-style progress bar. It segfaults and I don't know where. Any help finding it is appreciated. Thanks!
#include <stdio.h>
#include <string.h>...
?????????????????
so variables go out of scope after conditionals? bleh. i never knew that.... or didn't remember. probably the first
huh?
i don't have a copy constructor......
what part was wrong?
well i haven't learned templates (knew only C until last week) but umm... what do u mean out of scope?
yeah.... can somebody take a quick look at the unfinished code below and let me know if i'm properly overloading the operators? thanks.
matrix matrix::operator + (matrix other) {
int y, x;...
if you wanna replace a char containing a number as an ascii code, just do int x = y - '0'; (assuming y's a char)
i know i'm asking a lot, just handing out two programs and asking what's wrong, but i'm really confused as to why one of them only partially works.
idk i just fell in love with the ternary operator. for one / two line things. it's SO COOL!
i don't even know why.
ahh. commons instead of semicolons. got it.
I wrote an encryption program that converted every ascii val to hex, then to decode it converted it back. just for simple encryption.... and it worked on all files, even media files. then i wrote...
sweet.
another question by me..... the ternary operator only accepts one line , right? or does it? i'm confused about it. what does it allow? for example, (is (true) ? blah; return blah; :...
WHOA it works
can you explain how it works? (all i don't get is the substr and rfind functions....)
here's my integer conversion algorithm, from base 10 to any base 2-36. you could modify it to work with floating point nubmers, if you want to. let me know if you make any successful modifications....
ok i've decided to add .enc to the filename (so blah.txt becomes blah.txt.enc) when encoding, and strip the last 4 characters (blah.txt.enc -> blah.txt) when decoding - action taken, encoding or...
...........hello?
Hi,
how can i understand / control the /dev/input/mouse0 (or whatever dev it is for your computer -- mine has /dev/input/mouse0) interface?
also, my terminal doesn't support the extended ascii...
sorry, i either didn't see your post (7stud) or you posted while i was typing... oops.
thanks
well mine was originally from C, and i didn't know that C++ had a reverse funtion...... i just used it when i ported one of my programs from C -> C++.
so what does the .c_str() function do?
also, what are stringstreams?
dwks - what if the filename is longer than the number of chars? doesn't happen much, but the other day i wrote a program to...
i wrote a function to reverse a string, i used it in my base conversion algorithm, use this if you want:
std::string revstr(std::string str) {
char tmp;
int l = str.length(), l2 = l - 1,...
actually jawib's idea is kinda hard...
hmm...........
dwks, can i say :
if (argv[2][0] == "enc_") or would i have to do like ((argv[2][0] == 'e') && (argv[2][1] == 'n').... etc
hmm
double hmm.