473,386 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Point in polygon

I am trying to find out whether a point is inside a polygon.I am using vector std c++.

My program till now:
Expand|Select|Wrap|Line Numbers
  1. Polygon.h
  2. class Polygon {
  3. public:
  4. Polygon();
  5. virtual ~Polygon();
  6. virtual bool Inside(Point p);
  7. private:
  8. std::vector<Point> pts;
  9.  
  10. Polygon.cc
  11. Polygon::Polygon()
  12. {
  13. }
  14. Polygon::~Polygon()
  15. {
  16. }
  17. bool Polygon Inside(Point p)
  18. {
  19. int nvert=pts.size;
  20. }
--------
I liked the ray casting algorithm but I dont know how to do in C++. Could anyone help out?
Jul 17 '12 #1

✓ answered by weaknessforcats

Here again, polygon is a general word. Use it as a base class. Then derive your polygons: Square, Triangle, Rectangle, Pentagon, etc. Try to not start out to solve all polygons in one class.

Then in each derived class write a convert method to build the database. Each derived class can have a different algorithm and database. All that's in the base class is the function prototype that you override in the derived class.

Your square is just rectangle so maybe you derive square from rectangle to allow the square to use the same database as the rectangle. Maybe there is a parallogram class deriving from polygon and then square and rectangle derive from that.

The idea is that you implement a shape at a time. Figuring out if a point is inside or outside a rectangle or triangle is pretty straightforward so solve those first. You can just calculate these. No database required.

later when you have a polygon that's a rectangle with a triangle punched out of it you can use the already written rectangle and triangle code to find out of your point is inside our outside the shape. Like if it is inside the rectangle and also inside the triangle, then it is outside the shape. In your class are member variables that are Rectangle and Triangle objects.

C++ expects you to write a little and get that working. Then write a little more and get that working. By repeated improvement cycles you have this humongous capability and all along the way the program has been working. Any errors are probably in just the last improvement cycle.

28 33712
weaknessforcats
9,208 Expert Mod 8TB
Here again, polygon is a general word. Use it as a base class. Then derive your polygons: Square, Triangle, Rectangle, Pentagon, etc. Try to not start out to solve all polygons in one class.

Then in each derived class write a convert method to build the database. Each derived class can have a different algorithm and database. All that's in the base class is the function prototype that you override in the derived class.

Your square is just rectangle so maybe you derive square from rectangle to allow the square to use the same database as the rectangle. Maybe there is a parallogram class deriving from polygon and then square and rectangle derive from that.

The idea is that you implement a shape at a time. Figuring out if a point is inside or outside a rectangle or triangle is pretty straightforward so solve those first. You can just calculate these. No database required.

later when you have a polygon that's a rectangle with a triangle punched out of it you can use the already written rectangle and triangle code to find out of your point is inside our outside the shape. Like if it is inside the rectangle and also inside the triangle, then it is outside the shape. In your class are member variables that are Rectangle and Triangle objects.

C++ expects you to write a little and get that working. Then write a little more and get that working. By repeated improvement cycles you have this humongous capability and all along the way the program has been working. Any errors are probably in just the last improvement cycle.
Jul 17 '12 #2
Thanks for your suggestion. I did as you told. First I created a base class called Shape and a derived class called Polygon. In the base class, I used a function calculateDistance to calculate distance between 2 points.
Shape.cc
Expand|Select|Wrap|Line Numbers
  1. inline double Shape::calculateDistance(Point &a,Point &b)
  2. {
  3. //formula to calculate distance between two points
  4. }
  5.  
When I compile it, I get error as:
Extra qualification Shape on member calculateDistance.

I wrote the point in polygon algorithm in derived class and when I compile it, it refers to the same error as above.

Please help me out.
----------
@weaknessforcats
Jul 18 '12 #3
weaknessforcats
9,208 Expert Mod 8TB
There is no error in the code you posted.

Post the exact error your compiler gave you.
Jul 20 '12 #4
The error got solved when I removed the keyword inline. There were 4 lines inside the braces. So I removed it and now I have solved it.
Jul 23 '12 #5
weaknessforcats
9,208 Expert Mod 8TB
That may be but the code word inline was not your problem.

An inline function is not called. Rather the compiler makes a copy of the code and pastes the copy where you make your call. To do that the compiler must have seen the inline function before you call it so it can make a copy.

I suspect you made a call using a function protototype and not the function itself.
Jul 23 '12 #6
As you told, I made polygon as a sub class and used the algorithm below to find whether a point is inside or not.
Polygon.h
Expand|Select|Wrap|Line Numbers
  1. class Polygon: public Shape
  2. {
  3. public:
  4. virtual bool inside(Point& p)
  5. private:
  6. std::vector<Point&> points;
  7. };
Polygon.cc

Expand|Select|Wrap|Line Numbers
  1. bool Polygon::inside(Point& p) 
  2. {   
  3. int i, j, c = 0; 
  4.   int nvert = poly.size();   
  5.  for (i = 0, j = nvert-1; i < nvert; j = i++)
  6.  { 
  7.      if ( ((poly[i].y> p.y) != (poly[j].y> p.y)) && (p.x < (poly[j].x-poly[i].x) * (p.y-poly[i].y) / (poly[j].y-poly[i].y) + poly[i].x) )       
  8.  c = !c;   
  9.  } 
  10.   return c;
  11.  } 
This is the ray casting algorithm. But on compiling I am gettting plenty of errors like:
error: forming pointer to referenece type 'Point&'

Where am I going wrong? Can you help me.
Jul 23 '12 #7
weaknessforcats
9,208 Expert Mod 8TB
This code:
Expand|Select|Wrap|Line Numbers
  1. std::vector<Point&> points;
won't fly. A vector is an array. An array contains objects or pointers.

A reference is not an object. Rather it is an alias for an already existing object.

What your vector needs is a type and not a reference to a type.

Just do this:

Expand|Select|Wrap|Line Numbers
  1. std::vector<Point> points;
and your error will go away.
Jul 23 '12 #8
weaknessforcats
9,208 Expert Mod 8TB
OOPS.

The codeword inline was a problem after all.

Everything I said about inline functions is true but in addition since inline functions are not called they have no address. They have just been pasted around as needed.

Virtual functions, on the other hand, need an address so they can be overriden wherever they may be called.

Hence, inline functions cannot be virtual.

Sorry I didn't pick up on this sooner.
Jul 23 '12 #9
Thank you very much . I removed the & and the error went away.
Aug 2 '12 #10
Hello Sir

I am still not able to get sms frm polygonal geofence. As I told you, I tried to make Shape as a base class and Polygon as derived class. I have created a class called DataProcessor.cc

DataProcessor.cc
Expand|Select|Wrap|Line Numbers
  1. void DataProcessor::run()
  2. {
  3. std::vector<Geofence> geofences= DBCon->getGeofences(deviceID);
  4. /*Geofence is a struct in another file by the name DataObjects.h and geofences is a object of Geofence.I am writing the query in DBCon to get geofences which is also working fine and no errors are there.
  5. */
  6. }
  7. void DataProcessor::checkGeofence()
  8. {
  9. if(geofences.empty())
  10. {
  11. return null;
  12. }
  13. else
  14. {
  15. std::vector<Geofence>::iterator it_GF;
  16. std::vector<Geofence> curGeofences;
  17. std::vector<Shape> shapes;
  18. std::vector<Shape>::iterator shapeIt=shapes.begin();
  19. for (; shapeIt != shapes.end(); shapeIt++) 
  20. {
  21. if (shapeIt->isInside(curPosition.position))
  22. {
  23. curGeofences.push_back(*it_GF);
  24. }
  25. }
  26. }
  27. }
/*Shape is a base class and has the formula to calculate distance between two points. I want to assign the value of "geofences" into "shapes". I think that shapes.begin is always empty.
*/
How should I do it? Please help me out.
Aug 8 '12 #11
weaknessforcats
9,208 Expert Mod 8TB
You are not implementing polymorphism correctly.

If your Shapes class is a base class then your ocde using Shapes objects can only use a Shapes* or a Shapes&.

The Shapes class will define the interface and the derived classes will define the implementation.

Your best course here is to write a small test program so see how this all works. Polymorphism in C++ will require that you study up so I woulds look for articles on the web or perhaps get a textbook and actually implement the polymorphism examples to see them working.

Understanding how a virtual function works will be key in your being able to progress with your geofences project.

AS I see it you have a Shape with a derived class called Polygon which itself may have a derived class Pentagon.

Only the Pentagon class knows how to work with Pentagons.

You create a Pentagon and use it indirectly as a Shape:

Expand|Select|Wrap|Line Numbers
  1. Shape* s = new Pentagon;
  2. Myfunction(s);
Inside MyFunction, which has a Shape* argument you code:

Expand|Select|Wrap|Line Numbers
  1. void MyFunction(Shape* arg)
  2. {
  3.    bool result = arg->isInside();
  4. etc....
When you call MyFunction with a Pentagon, arg->isInside() is a call to Pentagon::isInside.

This works because Shape::isInside is a virtual function. The Pentago class overrides Shape::isInside with Pentagon::isInside. Then when you access a Pentagon object using as Shaoe* you gt the call to Pentagon::isInside.

If you use a Pentagon object as a Shape object, this does not work because a Pentagon object only partly a Shape object. Pentagon has more stuff than Shape. You lose the extra stuff in Pentagon when tu treat it as a Shape. You must treat it as a Shape* or Shape&.
Aug 8 '12 #12
Thanks a lot for your comments. I found out the mistake. I have edited my program and now in the process of compilation.
Aug 9 '12 #13
I think I am making mistake in designing the polygon algorithm. This is the algorithm which I have written. Is it correct?
Polygon.h
Expand|Select|Wrap|Line Numbers
  1. class Polygon : public Shape {
  2. public:
  3.  
  4.     Polygon(points_polygon p);
  5.     Polygon();
  6.     Polygon(const Polygon& orig);
  7.     virtual ~Polygon();
  8.  
  9.     virtual bool isInside(const Point& p);
  10.  
  11.     std::vector<Point> points;
  12.     int _ID;
  13.     int _userID;
  14.     std::string _deviceID;
  15.     std::string _name;
  16.     Point _polygon;
  17.     int _side;
  18.  
  19. };
Polygon.cc

Expand|Select|Wrap|Line Numbers
  1. Polygon::Polygon(points_polygon p)
  2. {
  3.    _name = p.name;
  4.    _ID = p.ID;
  5.    _side = p.side;
  6.    _userID = p.userID;
  7.    _deviceID = p.deviceID;
  8.    _polygon = p.polygon;
  9.  
  10. }
  11.  
  12. Polygon::Polygon() {
  13. }
  14.  
  15. Polygon::Polygon(const Polygon& orig) {
  16. }
  17.  
  18. Polygon::~Polygon() {
  19. }
  20. // Function to check whether the point is inside or outside the polygon : concept of ray casting algorithm
  21.  bool Polygon::isInside(const Point& p) {
  22.     int i,j,c=0;
  23.  
  24.     for(i=0,j=this->points.size()-1;i<this->points.size();j=i++)
  25.     {
  26.         if(((this->points[i].longitude > p.longitude) != (this->points[j].longitude > p.longitude))
  27.        &&(p.latitude < (this->points[j].latitude - points[i].latitude) * 
  28.           (p.longitude - this->points[i].longitude) / 
  29.           (this->points[j].longitude - this->points[i].longitude) + this->points[i].latitude))
  30.             c!=c;
  31.     }
  32.     return c;
  33. }
Aug 9 '12 #14
weaknessforcats
9,208 Expert Mod 8TB
This code:
Expand|Select|Wrap|Line Numbers
  1. (((this->points[i].longitude > p.longitude) != (this->points[j].longitude > p.longitude))
  2.  &&(p.latitude < (this->points[j].latitude - points[i].latitude) * 
  3. (p.longitude - this->points[i].longitude) / 
  4. (this->points[j].longitude - this->points[i].longitude) + this->points[i].latitude))
  5.  c!=c;
  6. etc...
  7.  
Is non-readable. Generally, compact code like this means smaller executable programs that run faster. Unfortunuately, the program has to work first.

Break this into sections:

Expand|Select|Wrap|Line Numbers
  1. int A;
  2. int B;
  3. int C;
  4. int D;
  5. int E;
  6.      A = this->points[i].longitude > p.longitude;
  7.      B = this->points[j].longitude > p.longitude;
  8.      C = p.latitude < (this->points[j].latitude - points[i].latitude;
  9.      D = p.longitude - this->points[i].longitude;
  10.      E = this->points[j].longitude - this->points[i].longitude) + this->points[i].latitude;
Using your debugger, verify each of these variables have the correct value.

Change the if statement to use A,B,C,D and E.

I was not able to understand this:

Expand|Select|Wrap|Line Numbers
  1. c!=c;
  2.  
since that will always be false.

I have no idea if the algorithm is correct. But remember with int calculations there are no fractional parts. 6/100 is zero. So code like X/Y where X is smaller than Y wil always be zero. Just be aware of this.

Also, you have public data members. These should be private. The reason is that should these get screwed up, the functions that did ir are the class member functions whose main job is to guarantee these values are never screwed up. That's a better deal as opposed to having screwed up values and not have anu idea where in the program that happened.
Aug 9 '12 #15
Hello Sir

I did as you told. First made as executable statements and wrote as
((A!=B)&&(C*D/E)); However I found that it does not enter the function at all in the main program DataProcessor.cc(I checked this by giving some statements like hello1, hello2 etc...). Does this mean my algorithm is wrong or there is some problem in calling function in main program? Please help me out.
Aug 13 '12 #16
weaknessforcats
9,208 Expert Mod 8TB
Have you set a breakpoint in your function to verify that it is not called? Your algorithm can't be wrong unless it is actually used to produce a result.

Sometimes a comiler omits code that can never be reached:

if (A is true) do this and return.
if (A is not true) do this and return.
Do some other processsing and return.

The Do some other processing will never be reached so wile it may be in your code, the compile will generally drop it from the compiled code.
Aug 14 '12 #17
I just modified the algorithm in Polygon.cc
Expand|Select|Wrap|Line Numbers
  1. bool Polygon::isInside(const Point& p)
  2.  {
  3.     int i,j= this->points.size()-1;
  4.     bool oddnodes=false;
  5.     for(i=0;i<this->points.size();i++)
  6.     {
  7.         if((this->points[i].longitude < p.longitude &&this->points[j].longitude>=p.longitude || this->points[j].longitude< p.longitude &&this->points[i].longitude>=p.longitude)&&
  8.                 (this->points[i].latitude<=p.latitude|| this->points[j].latitude<=p.latitude))
  9.         {
  10.             if(this->points[i].latitude+(p.longitude-this->points[i].longitude)/(this->points[j].longitude-this->points[i].longitude)*(this->points[j].latitude-this->points[i].latitude)<p.latitude)
  11.             {
  12.                 oddnodes!=oddnodes;
  13.  
  14.             }
  15.         }
  16.         j=i;
  17.     }
  18.     return oddnodes;
  19. }
However now I get an error "unable to resolve identifier points", though I have declared
std::vector<Point>points;

Why is this hapening now? I never got this error before.
Aug 14 '12 #18
weaknessforcats
9,208 Expert Mod 8TB
Does polygon.cc #include polygon.h?
Aug 14 '12 #19
Banfa
9,065 Expert Mod 8TB
weaknessforcats is away for a bit and has asked me to look after this thread.

I have tried compiling your code (as given in this thread) and it compiles without the error you are getting which suggests that you may have failed to properly include the header for Polygon or some other file structural issue.

Is this the only error you are getting? If not lets see them all please.

What compiler are you using? Have you set it to produce all possible warnings.

When I compile the above code I get these warnings

Line 7 that it would be best to use parentheses () to make sure the logic of the if statement happens correctly.

Line 12 the statement has no effect

In oddnodes!=oddnodes; != is the comparison operator that produces a boolean result, it does not change the value of its parameters. I believe that you where trying to toggle the value of oddnotes that would be oddnodes = !oddnodes;
Aug 14 '12 #20
Yes. It is also included. But I have found out where the mistake is. Thanks a lot.
Aug 14 '12 #21
I also found that I have to convert into degrees because of latitude and logitude. So I used this:
Expand|Select|Wrap|Line Numbers
  1.  double Dataprocessor::calculateDistance(const Point& a, const Point& b) 
  2. {
  3.     double lat = (a.latitude + b.latitude) / 2 * 0.01745;
  4.     double dLat = 111.3 * cos(lat) * (a.longitude -b.longitude);
  5.     double dLng = 111.3 * (a.latitude - b.latitude);
  6.  
  7.     return sqrt(pow(dLat, 2) + pow(dLng, 2));
  8. }
Now I want to find out whether a point is inside the polygon or not. So I used the above function and the polygon.cc and wrote:
Expand|Select|Wrap|Line Numbers
  1. if(calculateDistance(position,.....))
  2. {
  3. // push back to geofence
  4. }
In the above part, position is the position of test point and the other parameter would be the vertices of polygon. But it is not clear what should be written there? I want to compare the latitude and longitude of test point with each of the vertices of polygon using the ray casting algorithm.

I wrote points but showed me an error , failing to recognise it. What should be written?
Aug 14 '12 #22
Banfa
9,065 Expert Mod 8TB
points is a vector of Point, but calculateDistance is expecting a reference to a single Point.

You need to iterate through your vector of points and individually call the function for each one

Expand|Select|Wrap|Line Numbers
  1. for(std::vector<Point>::iterator iter = points.begin(); iter != points.end(); iter++)
  2. {
  3.   double distance = calculateDistance(position, *iter);
  4.  
  5.   // Do something with distance
  6. }
  7.  
Aug 15 '12 #23
Hello
I perfectly agree with you. I have done what you have told. Now I want to call the polygon algorithm. I tried this out but did not work.
Expand|Select|Wrap|Line Numbers
  1. if(isInside(curPosition.position))
  2. {
  3. //push geofences inside.
  4. }
  5. // Function to check whether the point is inside or outside the 
  6. //polygon : concept of ray casting algorithm
  7. bool DataProcessor::isInside(Point& p)
  8.  {
  9.  
  10.     int i,j= this->points.size()-1;
  11.     bool oddnodes=false;
  12.     for(i=0;i<this->points.size();i++)
  13.     {
  14.         if((this->points[i].longitude < p.longitude && this->points[j].longitude >= p.longitude || this->points[j].longitude< p.longitude && this->points[i].longitude >= p.longitude)&&
  15.                 (this->points[i].latitude <= p.latitude|| this->points[j].latitude <= p.latitude))
  16.         {
  17.             if(this->points[i].latitude + (p.longitude-this->points[i].longitude) / (this->points[j].longitude-this->points[i].longitude) * (this->points[j].latitude-this->points[i].latitude) < p.latitude)
  18.             {
  19.                 oddnodes!=oddnodes;
  20.  
  21.             }
  22.         }
  23.         j=i;
  24.     }
  25.        return oddnodes;
  26. }
//All the code is in DataProcessor.cc.
//curPosition.position is the current position of GPS device.

Where am I going wrong? There are no syntax errors. But I am no getting sms.
Aug 16 '12 #24
Banfa
9,065 Expert Mod 8TB
As I already pointed out in post #20 you have some errors that are causing your code to go wrong, for example oddnodes!=oddnodes; does nothing.
Aug 16 '12 #25
Hallo

Yes you are right. This statement always returns me 0 even if the point is outside or inside. Or how should I modify the code above to get even for outside and odd for inside ( ray casting method)? Please help me out.
Aug 16 '12 #26
Banfa
9,065 Expert Mod 8TB
As I already said I gave the solution to this in post #20
Aug 16 '12 #27
Hello

Thank you for the solution. But I could not understand this :
double distance = calculateDistance(position, *iter);

I am a starter with vector in C++ and I am trying to develop myself.
Aug 17 '12 #28
Banfa
9,065 Expert Mod 8TB
This is just a call to a function
Expand|Select|Wrap|Line Numbers
  1. double distance = calculateDistance(position, *iter);
double distance = - we are declaring a variable to hold the result called distance and we will initialise it with something.

calculateDistance(position, *iter); the thing we are going to initialise it, the return value of the function calculateDistance, 2 parameters are being passed to this function, position (which came from your own post) and *iter. Sinceiter is an iterator into your vector by dereferencing iter (*iter) we get the value that the iterator is currently pointing at.

When using a standard container, such as std::vector iterators are used to address each entry in the container in turn, a little like using a pointer you access members of an array. Iterators can be incremented to access the next member and there are a variety of stand-library methods which can help, for example std::distance the distance between 2 iterators into the same container. All containers have methods begin and end to get the iterator to the first entry and the iterator just after the last entry and rbegin and rend which gets elements in reverse order.

Look at this example (run and compile and understand)

Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4.  
  5.  
  6. int main()
  7. {
  8.     // Declare my vector
  9.     std::vector<int> numbers;
  10.  
  11.     // Populate it
  12.     for(int ix = 0; ix < 10; ix++)
  13.     {
  14.         numbers.push_back(ix);
  15.     }
  16.  
  17.     // Iterate through the vector and print out its values
  18.     for(std::vector<int>::iterator iter = numbers.begin(); iter != numbers.end(); iter++)
  19.     {
  20.         std::cout << "Forward Iterate: " << *iter << std:: endl;
  21.     }
  22.  
  23.     // Iterate in reverse order through the vector and print out its values
  24.     for(std::vector<int>::reverse_iterator riter = numbers.rbegin(); riter != numbers.rend(); riter++)
  25.     {
  26.         std::cout << "Reverse Iterate: " << *riter << std:: endl;
  27.     }
  28.  
  29.     // Check size
  30.     std::cout << "Count: " << numbers.size() << " = " << std::distance(numbers.begin(), numbers.end()) << std::endl;
  31.  
  32.     return 0;
  33. }
  34.  
Aug 17 '12 #29

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: paul | last post by:
library for querying virtual polygon over raster spatial data in my c++ application, after calculating my polygon i wish to define it (simple 4 sided polygon with floats or line parameters) and...
1
by: Jaime | last post by:
When I send a graph (polygon) to printer, I receive the next message: Object referente not set to an instante of an object.--- at System.Drawing.SafeNativeMethods.GdipFillPolygonI(HandleRef...
6
BSOB
by: BSOB | last post by:
im gone for a long weekend so plenty of time for anyone to answer. if i have 4 points representing a polygon and each point is represented by an x and a y coordinate, is there an easy (or slightly...
1
by: renu | last post by:
Hello, I have drawn polygon on window. And I want to check wheather given point is in that polygon region or not? How shold I find that? I have created object of class region GraphicsPath path...
3
by: jojo41300000 | last post by:
Hi, Is anyone know that how to get the x and y points inside the polygon using C++ program? I have the given polygon data to draw the polygon, but i don't know how to get all the points...
3
by: friendkitty | last post by:
Hi All, I m a new member here.I am now writing a program that render Vertex Normals.I m now trying to implement a data structure that will best suit computing vertex normals.For that computation ,...
41
AccessIdiot
by: AccessIdiot | last post by:
I have a puzzle for all you sql fans. Imagine a polygon with 12 sides (SideA, SideB, SideC, etc) Within this polygon are 96 points (Pt1, Pt2, Pt3, etc). Now let's say I have a table that has...
6
by: moondaddy | last post by:
I need to be able to make polygons with rounded corners. This will be to draw group outlines around shapes in a diagramming tool in wpf. all angles in the polygon will be 90 degrees, but somehow...
5
by: Dave Bootsma | last post by:
I have an application where I want to redraw a polygon from points I retrieve from a file. The file is read with streamreader line by line each line contains the points for each polygon. Below is...
1
by: JennySmith | last post by:
Hello friend. I want to write a program whether a given point in the plane lies inside, outside, or on the boundary of a polygon. I have found this interesting website which shows 2 ways of doing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.