CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: smurf12125

Page 1 of 2 1 2

Search: Search took 0.03 seconds.

  1. Replies
    27
    Views
    3,106

    Re: Algorithm problem

    The loop is supposed to make five copys of InString for the five different inputs that are going to input into the "database"
  2. Replies
    27
    Views
    3,106

    Re: Algorithm problem

    He explained what it was doing and wow not thinking clearly today :blush: I just need to move my braces around my for statement and keep the other brace after my statement that has my input statement.
  3. Replies
    27
    Views
    3,106

    Re: Algorithm problem

    oops had an unnecessary pair of braces there.
  4. Replies
    27
    Views
    3,106

    Re: Algorithm problem

    that's just to loop the program to keep repeating until it has 5 inputs. What is the statement doing then? :confused:
  5. Replies
    27
    Views
    3,106

    Re: Algorithm problem

    When I compile I don't get any errors in my for statement I keep getting this as my errors

    C:\MinGW\include\c++\3.4.2\bits\stl_algo.h|2044|error: no match for call to `(std::greater<int>)...
  6. Replies
    27
    Views
    3,106

    Re: Algorithm problem

    I need a break function to end the loop of inputting my text not for std::sort and Albert was talking about how I was sorting it as a vecor of ints instead of a vector of strings. I asked since I was...
  7. Replies
    27
    Views
    3,106

    Re: Algorithm problem

    Wouldn't I need to since StringArray would repeat until it a break function is input? Because StringArray would keep inputing text to the .txt file and would clear itself when it inputs the text to...
  8. Replies
    27
    Views
    3,106

    Re: Algorithm problem

    You were right there was an comma I accidentally didn't delete so I fixed that :thumb: now all the rest of the errors are saying that happen in the algo.h file but here is my code now
    #include...
  9. Replies
    27
    Views
    3,106

    Re: Algorithm problem

    here is the full error when I remove that semicolon
    C:\Documents and Settings\indstdy\Desktop\database.cpp|17|error: expected `;' before ')' token|
  10. Replies
    27
    Views
    3,106

    Re: Algorithm problem

    That just is leading me to more errors and expecting more primary expressions before every semicolon
  11. Replies
    27
    Views
    3,106

    Re: Algorithm problem

    that was to solve another error I was getting saying
    |17|error: expected `;' before ')' token|
  12. Replies
    27
    Views
    3,106

    Algorithm problem

    I have a algorithm bulit but I have errors and don't know why I am getting them.

    #include <iostream>
    #include <string>
    #include <fstream>
    #include <iomanip>
    #include <algorithm>
    #include...
  13. Replies
    11
    Views
    1,596

    Re: How would I alphabetize this?

    Your completely right and looping it is the best way to go thanks for the advice.
  14. Replies
    11
    Views
    1,596

    Re: How would I alphabetize this?

    alright but why won't this work?

    sort (s.begin(), s.end(), greater<int>());
    its saying that 's' isn't declared and if I do declare it then begin and end need to be declared so would I need to...
  15. Replies
    11
    Views
    1,596

    Re: How would I alphabetize this?

    Alright after researching algorithms and trying to implement it into my code I have run into another problem.

    #include <iostream>
    #include <string>
    #include <fstream>
    #include <iomanip>...
  16. Replies
    11
    Views
    1,596

    Re: How would I alphabetize this?

    Oh I didn't quite catch that part sorry, I'll look into algorithms now since I haven't learned about them yet. Thanks for all the advice!
  17. Replies
    11
    Views
    1,596

    Re: How would I alphabetize this?

    well all I needed was a small database to store some lines of text but it uses user input and saves it to a text file, its something simple but it also doesn't save over the previous input. I just...
  18. Replies
    11
    Views
    1,596

    [RESOLVED] How would I alphabetize this?

    How would I alphabetize this with the different strings? Would I just need to use a bubble sort?


    #include <iostream>
    #include <string>
    #include <fstream>
    #include <iomanip>
    using namespace...
  19. Re: Float point number garbage help

    I'm trying to have the user input a number with a decimal or without a decimal so assigning a number with and decimal to and integer that equals a float doesn't work. Why wouldn't that work since...
  20. [RESOLVED] Float point number garbage help

    I have a program that runs fine but outputs garbage and skips processes when I input a decimal. What is wrong here? It compiles fine and has no errors.

    #include <iostream>
    #include <float.h>...
  21. Re: Expected primary-expression before '=' token

    Well thanks for the help now I just need to figure out how to get the garbage numbers that it gives me for answers and I'm done with this file. Thanks for all the help and for putting up with my...
  22. Re: Expected primary-expression before '=' token

    Your right and I must of just put that in out of habit because I forget those on some lines, and what your saying makes more sense then half of the places I'm finding information on half of what I'm...
  23. Replies
    5
    Views
    620

    Re: [RESOLVED] Float point number help

    I don't have a debugger that works properly yet I'm looking for one though.
  24. Re: Expected primary-expression before '=' token

    How can't it work? I have other files that work using the same setup and they all run just fine. I'm learning all of this on my own and have only the internet as my resource for now.
  25. Re: Expected primary-expression before '=' token

    Well I'm pretty sure that I got both of them

    if (x == 1, 2, 3, 4, 5, 6);
    {
    cout << fValue2 * y;
    cout << result;
    }
    I forgot to include the other days in this if...
Results 1 to 25 of 37
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured