Search:

Type: Posts; User: verxintRising

Search: Search took 0.01 seconds.

  1. By the way, you don't have to declare a new...

    By the way, you don't have to declare a new variable. You can just do if (ans==42).

    If you want to get more complicated, you could use two arrays to store a bunch of easter eggs and call them with...
  2. Replies
    10
    Views
    2,362

    Changing it to a Win32 GUI project in...

    Changing it to a Win32 GUI project in Code::Blocks didn't do anything. Also, it is compiling with "-lcomdlg32", so that's not the problem.

    I've also seen plenty of console tools that can open a...
  3. Replies
    10
    Views
    2,362

    Where exactly do I put that? I don't see it in...

    Where exactly do I put that? I don't see it in the source code I got from the place UltraKing linked.
  4. Replies
    10
    Views
    2,362

    Well now that I have a vague grasp of how to use...

    Well now that I have a vague grasp of how to use this function.. I'm now getting an "undefined reference to GetOpenFileNameA@4" error when I compile.
  5. 1. Never thought of that but it's a good idea. I...

    1. Never thought of that but it's a good idea. I never had a problem with using pointers for dynamic arrays, so I always did that.
    2. Didn't know the at() function existed/was preferred.
    3. This is...
  6. Program crashes when trying to assign a value to a class variable

    find.cpp

    void find(vector<macros> &m, file &f)
    {
    char *c_file;
    c_file=new char[f.oldLength()];
    f.oldFile().copy(c_file, f.oldLength());
    for(int x=0;x<f.oldLength();x++)
    {...
  7. Replies
    10
    Views
    2,362

    Create an open file window

    How do I create one of those explorer windows for choosing a file to open? I'm guessing its some WinAPI function but I have no idea what it is. Thanks.
  8. Okay, I've tried writing something, but now I...

    Okay, I've tried writing something, but now I have lots and lots of wonderful errors.

    global.h

    #include <iostream>
    #include <cmath>
    #include <vector>
    #include <ctime>
    using namespace std;
  9. Alright, I did some reading and I think I'm...

    Alright, I did some reading and I think I'm starting to understand how to use references to get around global variables.


    void addNewEntry(std::vector<db_entry>& data)
    {
    ...
  10. I don't know anything about references, but I do...

    I don't know anything about references, but I do understand pointers.

    I'm wondering though, why are global variables bad? I've used them a few times and I don't see what can go wrong. And since...
  11. Replies
    8
    Views
    1,184

    I've found in my programs that if the user puts a...

    I've found in my programs that if the user puts a number larger than 2147483647 (32 bits with all but the leftmost bit as 1) into an int (using cin>>), the program skips over any cin>> anywhere else...
  12. Alright, im getting this now.. I'm a bit neurotic...

    Alright, im getting this now.. I'm a bit neurotic about using code I don't understand well so bear with me..

    back() references whatever is the last value in a vector (or array?). So in this case,...
  13. Hooray, more code I don't completely understand...

    Hooray, more code I don't completely understand xD

    1. what does back() do? how is it different from push_back()?

    2. With your function, what would I use to output? would it still be...
  14. So if I'm understanding this right... ...

    So if I'm understanding this right...


    #include <vector>

    int dbSize = 0;

    struct db_entry; //creates structure
    {
    int value1;
  15. That might be what I need.. would it be possible...

    That might be what I need.. would it be possible for that same method to be put into a function so a class can be created at the user's request?

    Edit: Lemme make sure I follow this, cause I don't....
  16. Is there a way for a program to generate the name of an instance of a class?

    Wordy title.. Lemme try to explain better.

    I'm trying to design a database-like program to see how well I can use file input/output, menus, and other stuff I've been working on in one single...
Results 1 to 16 of 16