Beginners - March 2015 (Page 17)

printing char array
 
my print output is "helloworld" instead of "hello" , why ? int main() { char a = "hello"; char b = "world" ; char p ; ...
[3 replies] Last: Imagen if his code was the first thing to land on pluto. (by TarikNeaj)
Conversion of a decimal number(<2^12) to binary.
 
Can someone please explain why the code isn't compiling. (especially in the last 3 lines of the function definition) I've used a recursion function in the...
[1 reply] : In function 'void f(int)': 25:57: error: no match for 'operator<<' i... (by Smac89)
PLEASE HELP! CLASS C++
 
1) Implement a class Quadratic that represents second degree polynomials, i.e., polynomials of type ax2 + bx +c. The class will require three data members c...
[no replies]
Compiler errors
 
I'm fairly new to C++, and I'm having problems when compiling this program, any help with any of the error would be appreciated Error list: operator.h(9): err...
[1 reply] : You shouldn't be #including the implementation file (.cpp) you should ... (by jlb)
by PJ63
help for project in intro C++ class
 
hi I'm a student at Penn State and am having trouble with a major project that's due in two days. Any help would be greatly GREATLY appreciated. here is the ins...
[6 replies] Last: I would do it this way. void populateArray(int score , int judge); i... (by fg109)
Series function
 
How can do e^x sum series by using function?
[4 replies] Last: http://www.cplusplus.com/forum/beginner/159149/ Read JLBorges' posts. (by fg109)
"to_decimal" function
 
Hello. Is there something wrong with my logic? The results are wrong and I can't find errors. //the string is supposed to be binary code. int to_decimal(stri...
[5 replies] Last: @might asker Good job. :) Here's a function that converts from one ba... (by fg109)
by Bako
string or vector
 
hi, i want to save character set ganerated by rand() function to a file and then compare another character sets,and i am interested which way is better to save ...
[no replies]
implementing .cpp and .h files
 
Hi everyone, I'm fairly new to c++ programming and I was just experimenting with this program, that works out symbol frequency, and I was wondering how I would...
[2 replies] Last: don't put function definitions in header files (unless they are inli... (by ne555)
by Fink
how to code a key to the encipher at decipher code?
 
this is the output A B C D E F G H I J K L M N O P Q R S T U V W X Y Z encipher decipher Exit Enter choice: e(user input) Enter message to encry...
[2 replies] Last: yes MR. OUR PROBLEM IS THE CODE FOR ENCIPHER AND DECIPHER (by Fink)
The code doesn't recognize the range
 
Hi there. I started writing some c++ codes a week ago and I run into this issue. I wanna write a bmi calculator and this piece of code gives me problems. It sh...
[15 replies] Last: You could test this by yourself. Test this double x; cin >> x; cout... (by TarikNeaj)
by koopey
array containing structures, grow dynamic memory
 
Hi guys! kind of stuck in this single problem since yesterday. so any help to give me 'redemption' ;) from this problem will be highly appreciated. The p...
[12 replies] Last: Not yet, but that's the name of the next chapter. (by koopey)
Code For Detecting power of 2 not working
 
Taking a CS class, but struggling with bools (other functions I can handle) This is supposed to detect if a number is the power of two, I played around with it...
[no replies]
by Cpp 1
My code for scoring is wrong
 
How can I fix my score code.. The score shown is always 33. #include <iostream> #include <stdlib.h> #include <time.h> using namespace std; void main () { c...
[1 reply] : Im honestly not gonna read most of this code, but Im gonna go on a hun... (by TarikNeaj)
segmentation fault
 
The usual segmentation fault..the debugger takes me to the line for(combi * put = head ........... am thinking head does not exist...which means call to fun...
[1 reply] : Provide all your code , this ain't enough to figure oit your problem. (by closed account SECMoG1T)
binary reading and writing to file
 
Hi, im having problem again I have this exercise where i have to split program that inside book into 2 parts 1. reading from file in binary stream mode 2. ...
[no replies]
issue with pointers
 
So this program asks the user to create and initialize a dynamic array,display the min,max, and average of the array, and search for an element, but its not giv...
[15 replies] Last: The problem is with this: if (location) cout <... (by fg109)
by Blue22
Two questions
 
#1. I have to Write a program that reads the contents of both files to two separate vectors. Prompt the user to enter a boy’s name, a girl’s name or both (a...
[3 replies] Last: Nevermind. Just went submitted the assignment with what I could do. (by Blue22)
by sassy
Help with Linear search!
 
Hello! I'm trying to complete so old homework assignments, and could use some pointers. When my program runs, it spits out both valid and invalid. Here's ...
[2 replies] Last: Get the input, then search the list - not vice versa. (by shamieh)
2D Arrays
 
When I run my program it says there is error due to an infinite loop. Where is the issue at and how do I fix it? #include <iostream> using namespace s...
[4 replies] Last: Read the comments on lines 10 and 11. Look at the code on lines 19 an... (by fg109)
March 2015 Pages: 1... 1516171819... 51
  Archived months: [feb2015] [apr2015]

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