The Love Meter 2.0 - HELP ME !!!

+1 Jeremy Hewitt · October 27, 2014
OK, I've scratched up a "Love meter", but wanted to add the ability to play appropriate MP3's to the final answer
>= 30 = Bad Company's "Feel Like Making Love"
<=29.999 = Electric Light Orchestra's "Don't Bring Me Down"

can anyone help.....PLEASE !!!

here's what I've got so far...

#include <iostream>
#include <cmath>
using namespace std;
int main()
    cout << "Do you love me as much as I love YOU ???" << endl;
    float a;
    float b;
    float c;
    float d;
    float sum;

    cout << "Well, on a scale of 1 to 10, how much do you "
    << "love me ???" << endl;
    cin >> a;
    cout << "On a scale of 1 to 10, how is the sex ???" << endl;
    cin >> b;
    cout << "On a scale of 1 to 10, how are my recipies ???" << endl;
    cin >> c;
    cout << "You know the routine, 1 to 10, how much do you " << endl;
    cout << "like the 'Little Things' that I do for you ???" << endl;
    cin >> d;
    sum = a + b + c + d;
    if (sum<= 29.999){
        cout << "Wow, a " << sum << ", guess I better work a bit harder, "
        << "but hey, YOU'RE WORTH IT !!!" << endl;
        cout << "Oh yah, and you won't ever have to worry "
        << "about ever being hurt again!!!" << endl;
    return 0;

Post a Reply


Oldest  Newest  Rating
0 Jeremy Hewitt · December 5, 2014
0 Mathias Frits Rørvik · November 11, 2014
This type of functionality does not come built in to c++, you will need to use a third-party library. There are many options, but I recommend using the SFML library, as it is very simple to use. However SFML does not handle mp3s, you have to use one of the following formats: 

ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64.

mp3 is a proprietary format and is therefore "difficult" to use for "hobbyists like us".
  • 1



Used in many types of software including music players, video games, and many large scale applications.

Bucky Roberts Administrator