that works. Also, I discovered the old C method:
sscanf(); I can't remember the syntax exactly right now, but it works great for parsing files =-)
thx -RSTR benthecat@hotmail.com
Is there a way to have searched through a text file like:
char line[256];
ifstream afile("c:\somefile.txt");
afile.getline(line, 255, '\n');
and assume that the first line of the text file was:
256.4223
That would mean that line[0] is = 2, [1] = 5 etc....
now lets say I have a...
Well, The C++ Code was uploaded through an ActiveX Object. Honestly, I don't know a thing about the whole process, but I did need to know if I could reference variables in VBScript. Since I can't, I now know that I have to write a new method in C++ that will return the variables to me directly...
I have loaded an Object that uses a method written in
C++ that looks like this:
functionname(int *Name, float *name2, float *name3 etc...)
Now, when i call for this function, I cant just write:
Object.functionname(Var, Var, Var etc...)
This gives me a type mismatch.
I assume this is...
I am relatively new to VC. I was wondering how to add new library files (i.e. the directx .lib's) so that i don't get those errors like, "function FUNCTION does not exist" even though they do exist.
Did I say that right?
-RSTR benthecat@hotmail.com
Well, that should do for now.. Still trying to grasp the concepts of C++ and this Compiler, and I was trying to get out of Terminal Mode compiling.
Thanks again
-RSTR benthecat@hotmail.com
I have seen this written in a class before:
constructor(): int1(0), int2(0), int3(0), etc(0) {}
could someone explain the part starting with the colon?
-RSTR
benthecat@hotmail.com
I was wondering if it was possible to return a char array from a class function.
I have tried :
char Function(){return string;}
but, of course, that doesn't work. So how do I get it to work? benthecat@hotmail.com
that's the thing, though, I'm not using any pointers at all.
just variables.
I have a class set up in a header file, and all I did was include it in a cpp file, and it didn't.
benthecat@hotmail.com
Could someone please tell me what this means?:
error C2040: 'Status' : 'int (void)' differs in levels of indirection from 'int'
Thankyou
-RSTR
benthecat@hotmail.com
I am having some trouble using randomize.
I believe that the function is located in stdlib.h
In turbo c++, I have this written:
#include <iostream.h>
#include <stdlib.h>
int main()
{
int x;
randomize();
x = random (100);
cout << x;
return 0;
}
This works fine in Turbo C++...
Actually, I'm sorry to have waisted your time.
I tried this on a different compiler, and it worked fine,
although I get an answer that looks like
3.55687e+014, Which I assume is scientific notation.
now my question is, is there a way to get the answer to not look like scientific notation...
Sorry, I thought that would happen. (was in a hurry.)
Here goes.....
/* Finds the factorial of a number */
#include <iostream.h>
typedef long int lint;
lint factorial(lint x, lint xdown);
int main()
{
lint x;
lint y;
int choice;
start:
cout << "which number do you want to find the...
I'm creating a program that works fine in long integer.
however, after 16 , the output becomes too big for long integer.
I tried switching to float or double, but during run time I get a stack underflow error.
can someone tell me how to fix this?
rstr@spacemail.com
I have this code written:
private_sub cmdback()
text1.text = info + chr(0)
end sub
This deletes one character, but when the button is clicked
again, it deletes nothing.
what am I supposed to do that will make a backspace work all of the time?
-RSTR
rstr@spacemail.com
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.