Beginners - November 2014 (Page 2)

Weird symbols in output.
 
I need to reverse a string using another string. But this code gives weird symbols in output. #include <iostream.h> #include <conio.h> #include <stdi...
[2 replies] Last: Your logic has lots of issue. for (int i=l-1; i>=0; i--) { for(... (by abeginner23235616)
C program student ID (1,2)
 
Hey everybody, I need a little help here. I am new to C programming and I can't work out this problem.
[20 replies] Last: You will be first given an integer ID. In the following 4 lines, you ... (by anup30)
#include header files won't allow me to complie (1,2)
 
Write your question here. I'm having trouble compiling my program whenever I include my header files for my view and my controller. I do have several classes s...
[20 replies] Last: You haven't posted what errors you're still getting. (by AbstractionAnon)
decltype() with dereference operator.
 
I have started learning C++ from the book C++ primer. In that book, the autor says that decltype will return a reference with dereference operator. Sorry if I a...
[2 replies] Last: The book has not introduced value category yet. I think that's what is... (by Hashirama senju)
Swapping Array elements using temp variable.
 
I'm trying to swap the contents of an array to get the array to display in reverse. The array has 12 elements so I need to swap the first with the last etc. I ...
[3 replies] Last: Just read the file once at the beginning. No need to read it inside th... (by Darkmaster)
by Mug
Output program
 
hello,everyone! how to write a program to achieve the following function: The value of x is assigned at the beginning of the program. And the following lin...
[8 replies] Last: thank you skimmer001 (by Mug)
Validating name so it has only characters
 
I'm trying to make sure that the user only enters alpha characters for their name. The for loop is my way of testing to make sure it's stepping through each ind...
[5 replies] Last: Why are you discriminating against people with non-letter characters i... (by LB)
by Danny7
create a random number with 1 to 3 and disply a message
 
hi i am trying to get this assignment done for school. i have to create random number with 1 to 3 and display a message. heres what i got so far but im stuck. ...
[3 replies] Last: is this the best way to have a response generated for each number gues... (by Danny7)
by helnar
Hash table for 2-sum problem
 
Hi everyone, 2-sum problem : find 2 numbers (x,y) in an array so that x+y equal to given t. I have solved this problem by sorting then use binary search, but it...
[5 replies] Last: Thanks for your helps. (by helnar)
string in arrays
 
Im doing a question from a book 4. You sell the book C++ for Fools. Write a program that has you enter a year’s worth of monthly sales (in terms of number of...
[3 replies] Last: you could do like wildblue said or get rid of the " " in the char arra... (by deathslice)
simple for loop problem
 
I'm writing a code where a user has 3 attempts to enter the correct password and I'm trying to make it so it shows: Please enter your PIN (3) tries left: Pleas...
[10 replies] Last: Yes. I just made the function return an int instead of being a void, a... (by skimmer001)
by xsxsux
little problem of array stuff
 
This program gets user to keep entering integers until a negative integer is entered, and print the number of nonnegative integers entered and the list of them ...
[4 replies] Last: thanks bro! I got it now (by xsxsux)
STRUCTURES AND ARRAY
 
Please help. I am trying to do that records the salerepresentative,his branch number and his sales using struct and repeat it 4 times. So here is my code but ca...
[3 replies] Last: @Frozen, I try the code and input mac as representative but why the ou... (by xShinichiKudo)
Basic File IO with structure (small reading problem)
 
I have written 2 functions, 1 writes data into a normal .txt file and the other reads the .txt file and shows it. I'm having an issue with reading a string s...
[6 replies] Last: If that's the only thing in your file, a loop isn't really necessary. ... (by Ganado)
by thor36
cout prints from main, but not from a different function won
 
Greetings all. I have a problem with cout that doesn't print anything to the screen, or at least one of couts doesn't. I have a program in main that also uses ...
[3 replies] Last: Simplified code looks something like this: #include <iostream>; usi... (by thor36)
Find all nodes in a binary tree on a specific level
 
Find all nodes in a binary tree on a specific level I have a BST and I just want to print all nodes on a specific level, ex: --------123 ----82 --125 I wan...
[2 replies] Last: sorry, I've just edited it. (by bathach95)
Need help writing a union function
 
I've been staring at this code all day and haven't made much progress. I'm supposed to complete the two functions for set_union and intersection, without using ...
[12 replies] Last: Yes! It works! I figured out the union function, too! Thanks!! (by InfiniteLoop)
Question about integrating a linear function
 
I need some help with a line of code I just can't figure out how to deal with. I need to write a single line function that accepts 4 parameters m, b, x1, and xn...
[5 replies] Last: Oops sorry, thanks for clarifying. (by solid648)
Help need with adventure text game.
 
1 1.Hello please I need a help with the following in adventure.cpp game.Please advise.Thanks Create constructors and destructors for each class you make fro...
[2 replies] Last: // the 3rd and last part of the entire source code. //------------... (by AMETOPRINCE)
Saving a vector of structs into a binary file?
 
I'm doing a final project for coding class and our program has to be menu driven with file IO in the command prompt. The only problem is saving a vector of stru...
[7 replies] Last: Hi Skimmer, A dirty, with no frills, approach would be to store the f... (by dean)
November 2014 Pages: 1234... 65
  Archived months: [oct2014] [dec2014]

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