Beginners - March 2016 (Page 7)

pointer to char not working
I want to print the txt ="abcd". However, it doesnot work. I am not good in pointer understanding. Would anyone kind to guide me in this regard? void f(cha...
Mar 27, 2016 at 10:43pm
[4 replies] Last: Thanks keskiverto, yes you're right. (by Chervil)
link: is not a member of node <T>
We are working on linked lists in our Data Structures class, and our instructor gave us this code to try in our compiler and it's not working for some reason! I...
Mar 27, 2016 at 10:31pm
[4 replies] Last: I'm sorry yes I just meant I am adding link to the struct I didn't... (by Outlaw782)
Dividing and Multiplying a Double yields different results
I have this little tutorial program I am playing with in C++ with QT. It converts 2 currencies at once based on user input. And it keeps all three of them sy...
Mar 27, 2016 at 10:11pm
[4 replies] Last: Thanks. That sounds like a good solution (by justcolorado)
Search and replace in text file
I'm trying to search and replace in a text file but it isn't working, I know its simple feel like im missing something small. I'm trying to replace Electric wit...
Mar 27, 2016 at 10:08pm
[3 replies] Last: That code is very hard to read - single letter names such as 's' are d... (by Chervil)
by ni0bi
input string and randomize the string
Hey whats up?? I need some help I am trying to change this code but having issues on the correct way to take the input of a string and rearrange the letters(...
Mar 27, 2016 at 10:06pm
[1 reply] : You are passing to the function mixup by value , so it is working on ... (by Moschops)
Updating Function parameter. (Classes)
I have to demonstrate the class in a program that creates a Car object, and then calls the accelerate function five times. My question is how do I get the p...
Mar 27, 2016 at 10:05pm
[6 replies] Last: Thanks for all the help! You guys! (by plsalinas)
How do you simulate a tree adt using a linked list?
My professor never explained to the class how to create one and the slides and textbook are hard to understand.
Mar 27, 2016 at 9:53pm
[1 reply] : He said there should be a class for Node, a class for position, incorp... (by DoABarrelRoll94)
by cybop
HELP!!!
I am new to C++. I am currently taking intro to C++ and was given the assignment below. The code I wrote does not even make it through the While loop...what I a...
Mar 27, 2016 at 9:30pm
[4 replies] Last: Thank you guys for your input, but this hasn't helped. I will find ano... (by cybop)
Problem with converting from infix to postfix notation
The program works fine when I input an expression without parentheses but not when I include parentheses. #include <iostream> #include <sstream> #inclu...
Mar 27, 2016 at 9:18pm
[6 replies] Last: I just changed the prcd function. I don't know why but when I was retu... (by DoABarrelRoll94)
by jcmd
project using while loops
This whole project i have to create is "A high-end coffee shop has just hired you as their senior programmer. They have tasked you to design and implement two ...
Mar 27, 2016 at 8:58pm
[1 reply] : One problem is that you need to initialize cost to zero before you sta... (by koothkeeper)
Modifying a program to take input data.
I have been tinkering around with this problem for the better part of an hour and after having looked everywhere I'm not sure what to do. Any help would be gre...
Mar 27, 2016 at 8:41pm
[1 reply] : Shouldn't your input file contain the answers the user gave when you r... (by koothkeeper)
How to reverse a sequence
Hello everybody, sorry for my english, I'm french. I'm also a beginner in C++ I have a question. I need to reverse a sequence of letters In one octet, there ...
Mar 27, 2016 at 8:01pm
[2 replies] Last: You could make an Octet class or struct: #include <iostream> #includ... (by xismn)
Rand() function and dynamic memory for Battleship.
I was working on a one player battleship game where the computer will randomly place the amount of ships that the player requests on the board, randomly. H...
Mar 27, 2016 at 6:39pm
[1 reply] : You need to initialize the random generator. http://www.cplusplus.com/... (by Thomas1965)
by jcmd
Adding while using for-loop
So I'm a first timer using this website, and first time using C++ or doing any programming. I am stuck with this assignment "Write a program that prompts the us...
Mar 27, 2016 at 6:26pm
[2 replies] Last: Thank you (by jcmd)
by asya
Alarm clock multiple issues
Hello, I have an alarm clock assignment. I tried for days, but I don't ave enough knowledge to make it. Here is a part of the assignment: Include 2 construct...
Mar 27, 2016 at 6:25pm
[no replies]
by asya
Count number of letters in a word from a file
Hello, I need to make a program that reads each word from a file and replaces the word with the number of its letters and prints it in an output file. The pro...
Mar 27, 2016 at 6:17pm
[3 replies] Last: Thank you. When I added "if (count > 0)" everything worked right. (by asya)
Averages from a file
Really Stumped!!! Not even sure where to start this is my first attempt at something like this and little info from the videos for a program like this. Here are...
Mar 27, 2016 at 6:16pm
[16 replies] Last: Aha! Great help ther must close. I am doing an online class with no in... (by miah612000)
How do you calculate the sum of arrays?
I'm new to C++ language. I would like to random generate 5 numbers (between 0 and 50) and then calculate their sum. Could I see an example of this? I know ab...
Mar 27, 2016 at 2:35pm
[3 replies] Last: > which is more generic than the sum() above It is not a wee bit more... (by JLBorges)
Insert into 3D vector
How do I insert a number into a certain index of a 3D vector? ifstream database("file.txt"); string line; vector<int> C(0, 0); vector< vector<...
Mar 27, 2016 at 1:18pm
[3 replies] Last: Oh, I figure out myself!! M.push_back(vector <vector<int> >()); An... (by tomtran3110)
Why does this program output 2 x the typed in characters?
It outputs http://s28.postimg.org/52zudak7x/Untitled.jpg #include <stdio.h> #include <conio.h> int main(void) { char ch; printf("Type in characters (Press E...
Mar 27, 2016 at 1:09pm
[1 reply] : Each character shows once when you type it in, and once when line 10 o... (by Moschops)
March 2016 Pages: 1... 56789... 47
  Archived months: [feb2016] [apr2016]

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