what about implementing a stack with a node type like this
struct nodetype
{
float blah;
int blah;
string blah;
int flag;
nodetype *back;
nodetype *forward;
}
so essentially build a doublylinked list, and call functions with a pointer to the type you want to get, and a flag...
in other words
struct node
{
int flag;
float a;
int b;
string c;
};
void stack::pop()
{
int temp = data[sp]->flag;
switch (temp)
{
case 1:
popfloat();
break;
case 2:
popstring();
break;
case 3:
popstring()...
when pushing the element, use a flag in the struct and set it when inside the pop function for float, use 1, for string use 2, for int is 3. then when poping, check the flag, and pop accordingly
using /proc in linux, you could probably obtain this.
my only thought would be to fopen the root directory, and maybe use the sizeof operator... i don't know for sure, but, it's my guess.
hmm... i think you could do this..
first of all if you encounter an A, it's gonna be a 10, and so on.
theres an alogorithm that basically says, take the remainder when you divide by the base you are converting to.
so if you have the number 4.
4%2 = 0
4/2 = 2, 2 goes down.
2%2 = 0
2/2 = 1, 1...
you could write a c++ program to build another peice of source code based on input. to run it and then compile the new code, you could use shell scripting. a shell script works very much like a c++ program. but, using main function return values, you can test to see that things went ok, and you...
if by any chance you are using linux... the proc filesystem probably has the mac address in it somewhere.. i'm not sure where, but that might be a way to do it.
also pipe ifconfig which i think someone suggested already
also, if you're using g++ to compile...
compile with: g++ -g <the rest>
then type gdb a.out
while in gdb type run
it'll tell you where it fails..
wait.. with command line input... it might work..
in main(int argc,char *argv[])
it is correct that argc will always equal at least 1.
if you wanted to find a certain character from argv
you could use argv[0][0] which would give you the first character of the command line. if you called ./a.out
and used printf ("%c",argv[0][0]); you...
ok, let's say i have a function call it foo.
foo wants to be able to look like this:
void foo (<output stream> s, int o)
{
s << "blah blah blah\n";
}
however, i would like to be able to use cout as one of those streams, so that with this function i could print to a file, cerr, or...
there should be a way to flash the bios, which would take care of your problems. call hp's tech help and see if there is.
this is another stab in the dark, but if you have a little reset button did you try that? (probably won't do anything though)
GOOD LUCK!
hey i've heard nothing but GREAT things about alienware. those rusty is right, building your system is the bestest way, since you can put whatever you want into it, customize the case if in deed you want to, and you'll be accomplishing something GREAT if you've never done it before. If you do...
there is another way. say you had a virus or something and just wanted to wipe EVERYTHING off the disk. you could do what's called low-level format. what it does is set all the bits to 0. usually a hard drive will come with a disk to do so.. but if not just search the web for a utility. in...
here's my question. i'm making a patient database for a doctor. I want to be able to type a social security number into a text box and be able to view all of the information about that person. how can i do this?
i have a form setup and can input information into it. and would also like to be...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.