My girlfriend broke up with me

I saw her with some other dude in cs and when I approached them she looked confused and walked away with him. Like I was pretty sure we were dating because we talk in class and stuff, so I'm confused. Advice??