Beginners - May 2016 (Page 24)

Why won't this code work? Help find what I did wrong please!
 
I am supposed to make a function that can do the following: function: bool subsequence(const string a1 , int n1, const string a2 , int n2) Task: If all ...
[1 reply] : > if (j = n2) = is assignment == is comparison ¿what's the point ... (by ne555)
Comparative values of strings?
 
So I've come across some strange results and I am looking for an explanation... #include <iostream> #include <string> #include <vector> using names...
[1 reply] : Hi, With "momn" vs "mnmo" , "mo" is greater than "mn" when looking a... (by TheIdeasMan)
Help with array function please! Not sure why it won't work
 
I am supposed to make a function that can do the following: function: bool subsequence(const string a1 , int n1, const string a2 , int n2) Task: If all n2 el...
[3 replies] Last: Use of code tags, see http://www.cplusplus.com/articles/jEywvCM9/ The... (by keskiverto)
how to sort integers and characters
 
how do i start sorting integers and characters checking for repeats if i have 12 numbers 1 9 12 13 14 17 18 8 21 1 2 22 causing repeats to be new numb...
[3 replies] Last: repeat removed that pretty cool needed new number for repeat so no re... (by programmerperson1)
Could someone help me with code optimization?
 
I've made a program that show number as a product of it's prime numbers. Unfortunately it's too slow with big numbers. Could you help me optimize it? #inc...
[1 reply] : > for (int i=2; i <= liczba; i++) Consider to test only the primes n... (by ne555)
Switch statements
 
I am in my first C++ class and I believe I have the switch statement about right but I keep getting an error. The error is expected unqualified-id before 'sw...
[7 replies] Last: I thought I was done but when I fixed what I had wrong this is what I ... (by ewgilliam)
help to do polynomial, also menus
 
need help to do polynomial is format (x + 1) (x + 1) how to build menus switch something...
[no replies]
Issues with Mastermind Program
 
I've been staring at this program for too many hours, and I'm at a complete standstill. I don't have the slightest idea when it comes to getting the hint system...
[9 replies] Last: Whitenite1's approach is better (and a lot easier) than sorting. (by dhayden)
problem in opening file in c++
 
please can someone tell where i am making the mistake,, I simply can't open the file "INTEGET.TXT" by switch case. code: #include<iostream> using namespa...
[2 replies] Last: The code won't compile for me. The reason is that a variable ( ofile )... (by Chervil)
2 errors: LNK1120, LNK2019 on line 1
 
I'm not sure what is causing these. I looked it up and since they are both directed to line 1 of my code, I figure "# include" list may be missing something or ...
[1 reply] : they are both directed to line 1 of my code No, those are linker err... (by AbstractionAnon)
Quinary to pentadecimal
 
I've made a program that converts quinary number to pentadecimal. It works fine with most numbers, but with some, like 1143 it returns correct anwser with 0 at ...
[1 reply] : You are unlikely to find anyone who wants to wade through that. Remem... (by Duthomhas)
having trouble with checking a password for a lower case letter
 
I wrote code to test for different requirements for a password. I can get most of the requirements to work except for the lowercase letter requirement it shows ...
[3 replies] Last: You need to reset your password variable for each line in the file. A... (by jlb)
Need help with errors
 
I edited my code to use a do while loop and to make a text file but i am having issues to understand the two errors I have #include <iostream> #include...
[3 replies] Last: The error is that your do-while loop is a mess and just plain wrong. ... (by Moschops)
I keep getting various errors while trying to pass a varriable through my second constructor
 
I need help fixing the second constructor so i can pass a a name trough it i know the call is right so its an issue with the second employee constructor. ...
[5 replies] Last: Yes. We already told you what the problem is. The function you're tryi... (by Moschops)
Sorting a vector without using sort
 
I have a vector, called sVec, containing the IDs of students and I want to sort them in numerical order. This is what I did so far but it only sorts some of the...
[2 replies] Last: No, he is doing the swap in the outer loop like it should be. You are... (by Ready4Droid)
by olaf94
Array made of string and int?
 
Hello there, so for a project im working on I need to be able to construct an array that saves a [club Name] and different values, thus I guess I need to u...
[4 replies] Last: Why are we using the wrong tool for the job? If you really don't want... (by Ready4Droid)
by norcal
Help with Arrays
 
So for my homework I have to complete this exercise: http://cs.dvc.edu/cpp/exercises/11.5.pdf I wrote most of it but I'm trouble with #6 which is asking me ...
[1 reply] : You're along the right lines, but what is: count = count; supposed... (by MikeyBoy)
Help reading data from a text file
 
Hello, I am having trouble displaying data from a text file into my project, it just displays 0 values. I need to read the data, and display it when the user ch...
[6 replies] Last: I deleted the percentage column but it's still displaying 0s :( Of c... (by Thomas1965)
can someone help me fix my code?
 
This code is supposed to create an array called fun, initialize it to the expression fun = 7 * i ^ 2 - 4 * i - 500, process it backwards, output it in range sp...
[14 replies] Last: One more thing: pow is a little inefficient when the power is an inte... (by TheIdeasMan)
by Arquon
While loop stops with one condition being true
 
Hi, I am trying to find a common denominator, but my while loop stops with just one conditiong being true, instead of 3. What am I doing wrong ? #include <io...
[2 replies] Last: Needed some time to figure out why it was supposed to be || instead of... (by Arquon)
May 2016 Pages: 1... 2223242526... 36
  Archived months: [apr2016] [jun2016]

This is an archived page. To post a new message, go to the current page.