Ok, so im trying to make my sister a flashcards program with dev c++. What you do is put in the deck name and how many cards you want. Then you go through for each card and put in what's on the front and back. I also want it so you can go back in later and access that deck again.

I also want it to have graphics and text input boxes, not the boring black box.

It would be grand if you could give me a very rough block of code for it.

Thanks!

Which windowing library are you going to use?

I think Dev has the Win32 API included (good tutorial here http://www.winprog.org/tutorial/). You might be better off starting with another GUI option like Qt (which will come packaged with a newer version of g++ than you have with DevC++).

You have made a start on defining the problem. Work it out in pseudo-code (describe in plain language the data and processes you need to transform that data to get the results you need), and analyze that until you are clear on what you want to do. At that point, you are ready to start coding - creating classes to model the data, and their behavior to reflect the data transformations you have determined are necessary to solve your problem.

Ok i have no clue what win32 api or ft or gui is so i need exact instructions on what to do. I have a windows 7 64 bit if that helps.

i need exact instructions on what to do

You're asking a lot from us.

You need to do some background reading on Wikipedia (see for example: http://en.wikipedia.org/wiki/Widget_toolkit and http://en.wikipedia.org/wiki/Win32 for some of the background on that other tutorial I linked for you) and decide which toolkit you want to use.

Win32 tends to be the more powerful option, but takes pages of code to get a simple window functioning. The other options cover some of it up for you, but it still takes a lot more than you're probably thinking it will.

I'm not trying to discourage you in any way, even though it might seem like it, but just the opposite. I just want you to know what you are up against, and I want you to be able to know what the options are before you choose one. Are you just getting started with C++ in general?

You might also want to google the web for an already-built flash card application if you aren't into programming it yourself. This google query, "flashcard application download", results in a large number of what seem to be relevant hits.

if you aren't into programming it yourself

I think the OP is into it and has good initiative. I just know from personal experience that jumping into Windows programming can take a lot longer than one originally intended.

@rubberman I think your suggestion of a ready made is a good one. If any of them are open source, that's an even better opportunity for the OP.

I think the OP is into it and has good initiative. I just know from personal experience that jumping into Windows programming can take a lot longer than one originally intended.

@rubberman I think your suggestion of a ready made is a good one. If any of them are open source, that's an even better opportunity for the OP.

I didn't look to see if any were (probably some). I just looked enough to see that there were a large number of seemingly reasonable prospects. It would be easy enough to refine the search to open source candidates to start from.

I realize im asking for a lot, cause im sorta procrastinating. I know quite a bit of c++ and will post what code i have later. Please continue helping.

Ok here's the cheap code i have.

#include <iostream>
#include <string>
#include <cmath>
#incude <fstream>


int main()
{
using namespace std;

String bck;
String frt;
string filename;
int a = 1;
Int x;
Cout << "enter the group name of your cards" << endl;
Cout << "how many study cards do you want?" << endl;
cin >> x;
while (a<=x)
{
Cout << "front of card:" << endl;
cin >> frt;
Cout << "back of card" << endl;
cin >> bck;
Cout <<  "enter file name" << endl;
ifstream datafile;
Cin >>  filename;
datafile.open (filename.c_str() )

A++;
}


Sytem("pause");
return 0;
}

That's very rough code. Please help me finish based on what i said.

Cout

Int

Cin

Tell me those statements compile on your machine, and I probably won't believe you.

Perhaps you missed the point of my other post. If you don't know which GUI toolkit or system you want to use, then you're not ready to start programming in it.

IMO, it makes life slightly easier in most OO GUI toolkits if you have all of your own code organized into objects. What you have there is not sufficient.

Can someone just give me the code and programs for the program please!!!

Any term papers we can write for you, too? Can I pick up your dry cleaning? ;)

It's at this point that you need to do what rubberman suggested. Find one that you can download for her. I know I'm not going to take you through the minutiae of writing a GUI program step by little step, and judging from the response to your question, no one else is either.

Ok i am kind of bossing you guys around and im sorry. I just looked up gui and its better than i thought. One question: does it take a special language or will c++ work?

i am kind of bossing you guys around

We wouldn't let you actually do that, but thank you for owning up to the issue.

C++ will work. If you opt to go the Visual C++ Express Edition/winforms route, the dialect of C++ used is C++/CLI and has a slightly different syntax, so give that one a second thought if you are thinking about it.

I would suggest you go for wxWidgets. You can use wxPanel/wxGLCanvas to draw your stuff depending on whether OGL or just pure wxStuffs. It is not that hard to draw images on wxPanel once you are used to wxWidgets. Good tutorial to begin with is here and good support at wxForum

Comments
I saw your name as having responded to the thread, and I knew immediately what you'd be posting about. :)

Ok i got wxwidgets but have no clue how to install help!!!

I think Dev is going to be one of the larger obstacles to that, as it's outdated. Honestly, I've never conquered that one myself. I know there's a build of it for Windows systems that lags behind the main release by a couple of versions, but I don't remember what it's called.

Can i do this program in java?

Why don't you ask in the Java forum? :) Yes, I'm sure you could, but there is a learning curve to anything. If you know Java and can familiarize yourself with whatever GUI toolkit they are using these days, then sure, but the same holds for C++.

Poke around the net for solutions to installing wxWidgets and if that doesn't pan out, start a thread (here, or in their forum,http://forums.wxwidgets.org/) with a concrete question about installing it (not just "it doesn't work").

Ok i got wxwidgets but have no clue how to install help!!!

Check this Wiki entry. The best way for newbie would be using precompiled version called wxPack. Use wxDevC++. It is updated version of DevCpp and have RAD for wxWidgets.
Hope that helps!

Edited 5 Years Ago by Stefano Mtangoo: n/a

Comments
wxPack was the word I was looking for, thanks!
This question has already been answered. Start a new discussion instead.