• Welcome to Religious Forums, a friendly forum to discuss all religions in a friendly surrounding.

    Your voice is missing! You will need to register to get access to the following site features:
    • Reply to discussions and create your own threads.
    • Our modern chat room. No add-ons or extensions required, just login and start chatting!
    • Access to private conversations with other members.

    We hope to see you as a part of our community soon!

Will someone come to my aid? (C++ and apps)

Ostronomos

Well-Known Member
Hello,

I am hoping that one of you might have extensive knowledge of C++ and creating an app using an IDE. I invented an app with million dollar potential but have not gotten it up and running let alone in the app store. I created it when I was high.

I want this app to simply display 3 pages of content in text format. Am I supposed to create a separate header file for the text and then write the code in another file? And use a member function to call the file that the text was saved on? If so, how do I do this?

I do not wish to take an istream just and ostream. Should I use the getline function? If so, what would that look like?
 

ChristineM

"Be strong", I whispered to my coffee.
Premium Member
I'd read it into an array. Then display the array.

But i have only used C and PHP, never C++
 

ChristineM

"Be strong", I whispered to my coffee.
Premium Member
My C programming days are decades in the past but that sounds reasonable to me.

Long time for me too. Never did much more than graphics manipulation, which was sometimes easier to read frames into an array than to calculate on the fly. Very memory hungry though.
 

icehorse

......unaffiliated...... anti-dogmatist
Premium Member
Hello,

I am hoping that one of you might have extensive knowledge of C++ and creating an app using an IDE. I invented an app with million dollar potential but have not gotten it up and running let alone in the app store. I created it when I was high.

I want this app to simply display 3 pages of content in text format. Am I supposed to create a separate header file for the text and then write the code in another file? And use a member function to call the file that the text was saved on? If so, how do I do this?

I do not wish to take an istream just and ostream. Should I use the getline function? If so, what would that look like?

I have sooooo many questions ;)

When you say "app" do you mean an app that will be downloaded to a phone and run standalone on the phone? (or tablet or...?) If not, what do you mean?

If so, what's your target OS? iPhone, Android, other?

AFAIK, the phone and tablet devices strongly encourage you to create GUIs not walls of text. So is it your plan to put the text in a window and then add scrolling buttons?

How will you be storing this text, in the app itself? How will you store it, as a string variable or...?
 

Ostronomos

Well-Known Member
I have sooooo many questions ;)

When you say "app" do you mean an app that will be downloaded to a phone and run standalone on the phone? (or tablet or...?) If not, what do you mean?

Yes.

If so, what's your target OS? iPhone, Android, other?

Android.

AFAIK, the phone and tablet devices strongly encourage you to create GUIs not walls of text. So is it your plan to put the text in a window and then add scrolling buttons?

Thank you for bringing this to my attention. I will install it on Android.

How will you be storing this text, in the app itself? How will you store it, as a string variable or...?

I will be storing it in the app, as a string variable. So far I tried to use the getline function and word object but the IDE gave me a weird error message.

Can I do this all in one header file? If so, I want to know which preprocessor variable header guards I will be needing (#define, #ifdef, or #ifndef). And do we need to write these header guards out in each and every file we create? Also, what will I need to charge people for the app and as well, how do I get the app from the IDE to Android?
 

icehorse

......unaffiliated...... anti-dogmatist
Premium Member
Let's step back / zoom out to 30,000 feet for a minute. If you're really keen to learn C++ independent of this app of yours, then go for it.

BUT.. if what you really want is to get your app done ASAP, then I think C++ is a poor choice, based on what you've told me. It sounds to me like your app is relatively simple from a GUI perspective, correct? In that case I'd recommend using a language that's easier to learn. Some good options are:

1 - Lua / Corona (that's where I'd personally start looking)
2 - Python (it's also a GREAT first language to learn in general)
3 - Java (even though I make a living teaching Java, it seems like overkill for your app)
4 - HTML / CSS / Javascript - not easy to learn but ubiquitous if you want to get into coding

C and C++ are infinitely applicable, but my rule of thumb is: tend to use C or C++ ONLY when they're clearly the best choice. Your app just doesn't warrant using these extremely difficult languages. C and C++ coders are usually experienced specialists, typically these are NOT first languages to learn.
 

Ostronomos

Well-Known Member
Let's step back / zoom out to 30,000 feet for a minute. If you're really keen to learn C++ independent of this app of yours, then go for it.

BUT.. if what you really want is to get your app done ASAP, then I think C++ is a poor choice, based on what you've told me. It sounds to me like your app is relatively simple from a GUI perspective, correct? In that case I'd recommend using a language that's easier to learn. Some good options are:

1 - Lua / Corona (that's where I'd personally start looking)
2 - Python (it's also a GREAT first language to learn in general)
3 - Java (even though I make a living teaching Java, it seems like overkill for your app)
4 - HTML / CSS / Javascript - not easy to learn but ubiquitous if you want to get into coding

C and C++ are infinitely applicable, but my rule of thumb is: tend to use C or C++ ONLY when they're clearly the best choice. Your app just doesn't warrant using these extremely difficult languages. C and C++ coders are usually experienced specialists, typically these are NOT first languages to learn.


Season's greetings.

I now see why some say C++ is an exceedingly difficult language to learn. But my intent is noble. I ultimately hope to become a seasoned specialist in this language. So any advice would be appreciated as it will bring me closer to my dream.

I want to build an artificial intelligence using neural networks.

My app may not be designed to align with the intended purpose and scope of C++ but I'm looking to learn only the best and most exclusive of languages in hopes of creating more advanced apps in the future. Can you please assist me? I believe I am already well on the way. I learned that the best choice to display text content in an app is to use an array rather than a vector. Is this correct?
 

icehorse

......unaffiliated...... anti-dogmatist
Premium Member
Season's greetings.

I now see why some say C++ is an exceedingly difficult language to learn. But my intent is noble. I ultimately hope to become a seasoned specialist in this language. So any advice would be appreciated as it will bring me closer to my dream.

I want to build an artificial intelligence using neural networks.

My app may not be designed to align with the intended purpose and scope of C++ but I'm looking to learn only the best and most exclusive of languages in hopes of creating more advanced apps in the future. Can you please assist me? I believe I am already well on the way. I learned that the best choice to display text content in an app is to use an array rather than a vector. Is this correct?

If your ultimate goal is AI and neural networks, I would again advise different programming tools. You might want to look at tools like TensorFlow or Keras. For example, you can use TensorFlow with C++, but most people, even researchers, use TensorFlow and Python.

This might be a bit of an over-simplification, but I think C++ is mostly used in a few, very focused domains of software development:

- graphically intense applications like first person shooter games
- in large systems, small, selected, key components that are compute intensive
- small programs that communicate directly with hardware components or devices.

The way I'd look at your array vs. vector question is again to zoom out and imagine the entire application when it's done. I would guess that even a dead simple app, written in C++, would end up being 1000 lines of code. The part of that code that's concerned with the question of array vs. vector will be relatively small, maybe 50 lines of code? In other words, you haven't gotten to the hard part yet, sorry to say. I think you'll find that the other aspects of writing the app, things like layering the GUI widgets, and writing event handlers, are much more challenging than displaying the text.
 
Top