Bathroom plumbing question

I'm in the process of dropping two water lines in my basement for a bathroom that's part of a basement finishing project. I've got the hot and cold lines coming down from the ceiling joists extending out through where the vanity will be. The toilet will be next to the vanity. Is it acceptable, (per code), to run another line off of the cold water line to use for the toilet? I guess I'm wondering if there has to be a separate cold line for the toilet or can it branch off the cold water line used for the vanity. This may seem like a pretty basic question, but I'm not real experienced with plumbing. Also, I'm using PVC pipe.
Thanks

Bathroom plumbing question

Bathroom plumbing question

Sorry, I should have given more information. I'm doing the framing also and so the lines are already going through and along the studs. I'm using 1/2" CPVC, not PVC. I know copper is probably a better choice but that's what they used when the house was built. I'm just wondering if it's okay to run the toilet line off the vanity line.
Thanks

Bathroom plumbing question

Quote:

Originally Posted by muehleisem

Sorry, I should have given more information. I'm doing the framing also and so the lines are already going through and along the studs. I'm using 1/2" CPVC, not PVC. I know copper is probably a better choice but that's what they used when the house was built. I'm just wondering if it's okay to run the toilet line off the vanity line.
Thanks

Bathroom plumbing question

Quote:

Originally Posted by muehleisem

Sorry, I should have given more information. I'm doing the framing also and so the lines are already going through and along the studs. I'm using 1/2" CPVC, not PVC. I know copper is probably a better choice but that's what they used when the house was built. I'm just wondering if it's okay to run the toilet line off the vanity line.
Thanks