I have never used the mult lang feature, but for example when I wanted to use OLE components in Builder I had to add the appropriate packages in the compiling options, for them to appear in the menu. Maybe this is something similar you need to investigate?
Ras....
User Profile
Collapse
-
-
This is some pretty good answer. But sometimes I wonder if it's actually worth it to answer such posts and spend much more energy than the initial poster seems to have put.
Ras....Leave a comment:
-
If you include the standard library there is the function random(someInte ger), that is going to return an integer from 0 to someInteger.
I believe it's the second type of random function generator that ravenspoint posted (mathematical).
Ras.Leave a comment:
-
I must share this: I was TAUGHT AT SCHOOL to use goto in VB.
At times some profs really have the skills to ruin you......Leave a comment:
-
I understand the whole thing now: I use Borland SDK, and instead of doing "#include <vector>", I work with "#include "vector.h" and then the vectors I use are not actually the ones of the standard library... no "using namespace std;" needed, and last 2 posts confusions understood.
And actually as I'm writing this I only understand now why I was having an unexpected behaviour doing certain specific...Leave a comment:
-
Your comment makes sense, and I do take some blame.
But it seemed to me that a page like http://www.cplusplus.com/reference/stl/vector/ , on top results in google for simple queries, would be a more concise and helpful information than going on from scratch in this one thread. Also, a simple search on vectors in this forum would pop up all the basics. I admit, this way is not the most courteous.
As for the includes, it maybe...Leave a comment:
-
I use method as a synonym to member function.
There's already a thread on this:
http://www.thescripts.com/forum/thread519233.html
Ras....Leave a comment:
-
[code=c]
std::ifstream file; //declare an input stream
vector<string> vData; // declare your vector as a container for strings
string temp; //needed to push the data in the vector
try{
file.open (path); // replace "path" by your path, or declare and define the variable path
}
catch(...){
//Do something
}
while(!file.eof ()){ // Read...Leave a comment:
-
Or more compact:
[code=c]
int CalculateAverag e (int integer_1, int integer_2, int integer_3, int integer_4, int integer_5)
{
return ( (integer_1 + integer_2 + integer_3 + integer_4 + integer_5) / 5);
}
[/code]
and maybe CalculateAverag e would be better returning a float instead of int.
Ras.Leave a comment:
-
I suggest the use of vectors over arrays. use push_back() method to fill them.
Ras.Leave a comment:
-
A low-level solution could be to ask him to stop.
A hardware solution could be to cut the wire of his keyboard.
A software solution could be to use his own programs against him, to inhibit him.
The point being made is that your question needs to be more detailed....Leave a comment:
-
This is a late reply, but I've been out of town for last 2 weeks. Anyway, just to say it's certainly good some times to put some humour in replies, and I'm obviously not taking personal negative answers to that.
Ras....Leave a comment:
-
Personally, I think the main difference between C and C++ is the '++'.
Ras.Leave a comment:
-
aren't you missing a method that would allow to do something like myv[0].getValue() ?
or did you overload the << operator, returning a ostream?...Leave a comment:
-
Stickies
Hello,
with 4 stickies and 1 announcement, my humble opinion is that they get overpassed more often than they get read. I also think it's a bit annoying for regular members to have to face this amount of permanent posts everytime they get into the forum.
More precisely, I would suggest:
1. Creating a third forum under http://www.thescripts. com/forum/forum215.html, and call it Tutorials... -
Thanks. And to finalize this dicussion, what are the options that replace:
Ras....Leave a comment:
-
Thanks for your time.
This is the learner's job!
Well, in the help of my compiler I see that the declaration of strtok() is
[code=cpp]
char *strtok(char *s1, const char *s2)
[/code]
Furthermore, an example is given;
[code=cpp]
int main(void)
{
char input[16] = "abc,d";
char *p;
...Leave a comment:
-
Thanks for taking the time to test and answer.
Sure. I didn't even know this type of declaration was permitted. What's the applications?
I tested your code on my compiler, and it did not produce the unexpected behaviour. It seems it's because of the nature of the modification you applied to temp.
In my code I had something like:
[code=cpp]
vector<string> v;
string...Leave a comment:
-
vectors - push_back() method
Hello,
suppose I have a string temp that I want to push in a vector vec1, using:
[code=cpp]
vec1.pushback(t emp);
[/code]
I noticed that if I change the content of temp, it will change the content of vec1[lastItem], unless I push in another value after temp. Another variant to get vec1 immunized against changes in temp was to use
[code=cpp]
vec1.pushback(t emp.c_str());...
No activity results to display
Show More
Leave a comment: