ProgressBar value label

Hello i wanted to make a % thing from the progress bar like 1%,2% etc. but i don't now why so i used this code:

 
  This->Label->Text = progressBar->Value & "%"


but it gives me this errors :

1
2
3
4
5

1
1>  name.cpp
1>c:\something(111): error C2297: '&' : illegal, right operand has type 'const char [2]'
1>c:\something(111): error C2143: syntax error : missing ';' before '}'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
You're trying to use the bitwise AND operator (with a string for some reason?) and you shouldn't be.
You've missed the semi-colon at the end of the line.

What gui library are you using? Do you have to set the value of the progress bar as a percentage? Or do something like set the max value of the bar when you declare it, and then then the value?
Last edited on
no i didn't use the percentage and i'm coding in the form1.h so i didn't use any library.
P.S: I started coding like for 3 weeks so i don't really now "nothing" since i only have 13 years and i wanted some base for the T.I.C class
Last edited on
When you created your project, what kind of project did you create?
edit:
is this of any use?
https://www.youtube.com/watch?v=m7i9J3UdcHI
Last edited on
CLR -> Windows Form App

-> No it's of any use cause i don't use buttons .. i'm starting the program with the progressbar loading it self by making the

timer1-> Enabled = True(start when program starts) -> progressbar->increment(1); etc.

P.S: I'm making a splash screen.

-> Do you have skype or something ? :p cause i need some guy who understand c++ to help me.
Last edited on
So it's CLR. that youtube clip i posted might be of use then.

edit: if this isn't an assignment, and you are just wanting to do some preparation before a class starts (good idea by the way), may I suggest you stay away from the GUI stuff to begin with and go through the c++ tutorials on this website.
Last edited on
ok but how can i make the splash screen? just add a image and the picture in the back ? :p
I've no idea. You originally asked about a progress bar.

edit: You get lots of hits if you google "making a splash screen in c++"
Last edited on
Yeah i just wanted to now how to change things when it's on 25% and things like that but i don't know how to make the "%" so i was asking here xD
Topic archived. No new replies allowed.