Beginners - March 2018

Trouble when using functions?
 
I created this program without functions and it worked fine... can anyone help me figure out why when I split the code into functions the totals that print are ...
[11 replies] Last: I really appreciate the help from everyone, I have it working as desir... (by stormbot)
General question regarding Load-instruction
 
Hey, i´m studying electrical engineering and this semester we started learning the basics of programming Assembler with the Infineon XMX4000. Our fist lec...
[1 reply] : I don't see what this has to do with C++. (by helios)
arrays within a struct
 
I'm writing a program for class and using an array contained within a struct. The struct is below: struct Project_List { Project_Data project_All ; ...
[7 replies] Last: One of the best ways to learn, keep pushing the boundaries of what you... (by closed account E0p9LyTq)
Undefined reference to function but it has been defined?
 
Here is the main #include <iostream> #include "orderedLinkedList.h" #include "LinkedListType.h" #include "LinkedListIterator.h" using namespace std; int m...
[10 replies] Last: Yes peter and icy. This is how I initially understood it, but try as I... (by redman008)
c++ loop for continuous adding
 
How do I make a loop with while or do while that can add until I reach 100 or over?
[2 replies] Last: #include <iostream> int main() { unsigned short top_num = 0; s... (by closed account E0p9LyTq)
Doing homework for a class I'm not enrolled in
 
Hello! I'm trying to learn C++ by having my friend in class send me his homework and me just doing it on my own, I've been able to keep up until now, I have no ...
[9 replies] Last: You can have your Section enum store the prices directly as part of th... (by closed account E0p9LyTq)
c++ while within a y/n while loop
 
I'm doing a while loop within another while. The while within the while works fine if I eliminate the while surrounding it. The problem is the exterior while. I...
[5 replies] Last: Probably want to re-initialize i too for that second run... (by zaphraud)
print functions messing with my totals?
 
I have this program properly counting the uppercase, lowercase, and digits in a text file. However, when I add a function to print the file, the function to cal...
[4 replies] Last: If you want a function's return value to be assigned to multiple varia... (by closed account E0p9LyTq)
alternative to string. insert with algorithm
 
this is how i insert character in array of character. char arraytest ; int position; char insert; cout<<"Enter element to be inserted : "; c...
[4 replies] Last: There are several different ways to add characters and std::strings to... (by closed account E0p9LyTq)
Cannot stop sentinel loop from running away.
 
So, I have written one program already that is supposed to allow a user to input the word length of a story and the Authors skill level ( Ranging A, B, C). That...
[2 replies] Last: Thank You so much for your wisdom. I have not had time to revise the c... (by Mjimmie1)
Unable to understand unexpected behaviour
 
I am confused why am I facing infinite loop in line 20. #include <iostream> #include<string.h> #include<fstream> using namespace std; class book { int bo...
[2 replies] Last: Thanks a lot, I will remember your advice,thanks again (by samir1996)
Char Array input
 
How do i input(cin) char array for example name and user inputs "Mike Jordan" and the computer scans the whole line and stores it in name . It must store the w...
[2 replies] Last: Thank you very much on help! (by Bakenhuman)
Printing a 2D Dynamic Array Class
 
Im coding a game called Gomoku(Gobang) and i have used a 2d dynamic array to implement the board in a class, however my code doesnt print the board and crashes ...
[4 replies] Last: Thanx bro..works perfectly! Only problem was that i had char** board =... (by Mattthews)
Issue when modularizing simple program
 
I had to create a program that reads from a text file, and then counts the number of uppercase, lowercase, and digits. I made it perfectly working without modul...
[7 replies] Last: Yes. void aFunction (int& a, int& b, int& c) If you are not going ... (by closed account E0p9LyTq)
Problem With Random Number Generator
 
I am a college student taking a C++ class, and was given this assignment: Goal: Write a program that will make use of your knowledge of pointers to build a sor...
[4 replies] Last: THANK YOU SO MUCH AGAIN!! THAT REALLY HELPED !! @DHAYDEN (by mysiarobin1987)
c++ decreasement in printing after y/n sessions
 
I'm not sure why, but every time after I type in yes, the program prints less numbers than requested after every session. Like I want 5 numbers to be printed...
[2 replies] Last: Thank u (by DigiLei)
Converting from standard time to military time
 
Write a C++ program that reads a time from the keyboard. The time should be in the format "HH:MM AM" or "HH:MM PM". Hours can be one or two digits, minutes are ...
[1 reply] : Hello dstuck15, Welcome to the forum. Do not think about the whole p... (by Handy Andy)
Strange question about two equal values
 
Các bệnh về đại tràng. Mục đích của đại tràng là bôi trơn chất thải, hấp thụ nước và muối còn lại trong chất thải, ...
[5 replies] Last: This has come up before: http://www.cplusplus.com/forum/beginner/23148... (by lastchance)
by Daean
Help
 
Hi, there. I have some troubles with my code... so.., you can see below the code.. If I type 'l' anything is working good. The message "Wait" Appear.. but, if I...
[3 replies] Last: Hello Daean, You are welcome. If you are done put a green check in t... (by Handy Andy)
c++ do while inside another do while
 
Is it possible to put a do while inside another do while? If so, could someone show me how it works?
[2 replies] Last: thanx (by DigiLei)
March 2018 Pages: 123... 29
  Archived months: [feb2018] [apr2018]

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