Beginners - March 2017 (Page 8)

BubbleSort-String Comparison
Hi. I am a beginner in C++. I was trying to make a function in a program that would read strings from a vector and would sort them by length. I thought that the...
Mar 25, 2017 at 1:34pm
[4 replies] Last: yes, it compares them character by character using the ascii table's n... (by jonnin)
c++ project wrapped by java interface
Hello I have a simple antivirus coding written in C++ language for my final year project. My question is, is it possible for me to make a mobile application ...
Mar 25, 2017 at 1:10pm
[1 reply] : Yes, you can call C++ from an Android Java app using JNI. No idea abou... (by helios)
How to do a case insensitive search/comparison of a string?
How can I perform a case insensitive comparison/search of a string? I want to use cin to have the user input some string and then compare that to what is store...
Mar 25, 2017 at 7:44am
[6 replies] Last: > I don't really understand the line that has the for loop. That whole... (by JLBorges)
Triangle code
I just finished this bit of code and wanted to see if there's any way I can improve it. I am trying to learn new, more efficient techniques to code so any criti...
Mar 25, 2017 at 7:08am
[1 reply] : #include <iostream> #include <string> using namespace std; int main(... (by lastchance)
How to display only 3 strings from an array per line?
Hey everyone, So I need to somehow be able to display the elements I have stored in an array of the string data type but displaying them 3 to a line. So if I ...
Mar 25, 2017 at 5:56am
[4 replies] Last: Chervil, I didn't notice that upon first look. Makes sense and I appr... (by MisterTams)
by knoel
fstream.. checking if the file exist
hi goodday! im having trouble in my code by checking does the file exist? let say i already save a txt file, then i want to check if that file exists. void a...
Mar 25, 2017 at 5:41am
[7 replies] Last: Try this (first add the book using option 1 and then check for the boo... (by JLBorges)
Shortening code
Hello may I ask how to call out functions instead of copy-pasting, specifically this rating system below? if (rate == 1 || rate == 2) { cout << "Ooh...
Mar 25, 2017 at 5:35am
[1 reply] : #include <iostream> #include <string> const std::string prompt = "C... (by gunnerfunner)
by fguy
Floating point underflow
I have written my code in C, hope that's ok. The purpose of this code is to simulate floating point underflow. My understanding of FLT_MIN is that it is a...
Mar 25, 2017 at 4:34am
[6 replies] Last: so after dividing FLT_TRUE_MIN by 2 I get 0 (zero) which is not what ... (by Chervil)
storing two nibble in a byte
hi friends, I am at novice level of learning programming.I am involved in a project which requires to store two nibbles in a byte .how to do this
Mar 25, 2017 at 1:09am
[11 replies] Last: I don't think any amount would part me with that thing. You can't get... (by jonnin)
Generating a random number
Just a quick bit of help needed for a big project I'm working on. Does anybody know about making a random number that is either '1' or '-1'? I ask because if I ...
Mar 25, 2017 at 12:56am
[4 replies] Last: # include <random> ... std::mt19937 gen(std::random_device{}()); std:... (by mbozzi)
Function
I am needing to write a function to encrypt and decrypt. I am stuck on what the return type should be. As well as the types of arguments. So like for instance f...
Mar 25, 2017 at 12:42am
[3 replies] Last: looks like string in, string out to me. Whether string is a char* std... (by jonnin)
Can somebody please code this for me?
Write a program: 1. Ask the user for two positive integers between 2 and 10. (Input Validation: If the user enters other numbers , you should display error ...
Mar 24, 2017 at 11:01pm
[2 replies] Last: For the 2-10 part you would put. while the side length is less than 2... (by test1234)
How to access a variable inside a class that is edited through functions within the class?
First of all let me say that my issue is NOT accessing a private variable. I know how to do that. I'm currently working on a project for my college computer ...
Mar 24, 2017 at 10:35pm
[3 replies] Last: Thank you @JayhawkZombie! Your answer guided me in the right directi... (by Muttlife)
by Werda
Database Project
PLZXX anyone helpout in removing the errors of this code.. #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<graphics.h> #include<dos.h> #in...
Mar 24, 2017 at 8:28pm
[1 reply] : Hello Werda, PLEASE ALWAYS USE CODE TAGS (the <> formatting button) w... (by Handy Andy)
Operator Overload Not Working
Hey guys, I am a sophomore in CS and am having a bit of trouble with operator overloading. My code will not compile and I have exhausted my search through the i...
Mar 24, 2017 at 7:37pm
[no replies]
***Why Won't += Work Here?***
Why won't += work here to complete the loop properly? #include <iostream> #include <cmath> #include <iostream> #include <fstream> #include <string> #...
Mar 24, 2017 at 7:13pm
[1 reply] : You might be confusing your compiler. When math is happening, the << o... (by newbieg)
by Ponvo
Overloading operators, matrix arithmetic. Result problem.
Hello guys, I am currently working on an assignment that is due in 4 days. The point is to make a program that performs matrix arithmetic (addition, subtraction...
Mar 24, 2017 at 6:08pm
[2 replies] Last: Thank you gunnerfunner, this was useful. I was missing an initializati... (by Ponvo)
by zTal74
Help with If
hi, im learning c++ alone beacause my teacher dont do nothing. im creating a game like spacewar, but im getting problems with a IF, i would like when wep hi...
Mar 24, 2017 at 6:02pm
[2 replies] Last: OK. Please consider focusing on learning English first. Not knowing t... (by zTal74)
Calender issues
So i am creating a calendar in c++ for school and ive got the code down for the most part but when it tries to output a calendar for December 1753 it comes out ...
Mar 24, 2017 at 3:59pm
[2 replies] Last: @urrutiaeric Made a few minor changes to your code, but the days fall... (by whitenite1)
Help with a vertical output question
Write a program that takes a non-negative long as input and displays each of the digits on a separate line. The program output should look similar to: Enter a...
Mar 24, 2017 at 3:54pm
[4 replies] Last: A small emebellishment #include <iostream> #include <string> int ma... (by closed account 48T7M4Gy)
March 2017 Pages: 1... 678910... 36
  Archived months: [feb2017] [apr2017]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.