2 Replies - 3099 Views - Last Post: 18 September 2015 - 09:12 AM Rate Topic: -----

#1 iamsachin  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 53
  • Joined: 14-August 15

notification counter c++

Posted 16 September 2015 - 12:33 AM

hii guyz im trying to make a notification counter which will show the number of notifications and when user has seen the notificatons the counter turns to zero, just like facebook

i have a logic but i haven't made it in to the code;
the logic is as follows

we will have to int variables both will have values as 0,second one will hold the valuse of no. of notification as read from the file. if the file is opened will we set first variable to 1 and if the variable is set to one the other variable will be zero.
but i think its gonna show notifications every time even if there are none.

Is This A Good Question/Topic? 0
  • +

Replies To: notification counter c++

#2 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 4580
  • View blog
  • Posts: 14,932
  • Joined: 05-May 12

Re: notification counter c++

Posted 18 September 2015 - 04:53 AM

What does the first variable represent? Why does it have to be an int? Would a boolean be better or worse for the intended purpose?
Was This Post Helpful? 0
  • +
  • -

#3 iamsachin  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 53
  • Joined: 14-August 15

Re: notification counter c++

Posted 18 September 2015 - 09:12 AM

i have no idea but i have dropped the plan now anyways thanks !!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1