Beginners - April 2018 (Page 24)

i have got this assigment , i have 80%.
 
how to add object into another object , how can we do it.
[1 reply] : gonna need a little more here... (by icy1)
classes
 
#include<iostream> class A { public : int*x; }; class B { public: A _a; }; in...
[3 replies] Last: so when using operator () its the same as using = I’m afraid that... (by Enoizat)
Single = in if condition
 
What happens if we use a single "=" in an if condition?
[7 replies] Last: That's good to know. Thanks! (by dhayden)
Print in a Box
 
I'm having some trouble understanding how I'm supposed to go about coding this specific program to t...
[3 replies] Last: Which part don't you understand? There are many, many ways of doing t... (by lastchance)
2D Array printing gives "stack smashing detected"
 
I'm getting an error in that says: " stack smashing detected: ./a.out terminated Segmentation fau...
[12 replies] Last: How did you get the stack smashing error? Compile with -fstack-prot... (by mbozzi)
Using functions From another class
 
Hello, I'm wondering if I can access a function from a class Foo and use it in a function in class b...
[4 replies] Last: Ok, cool, Thanks for the help (by closed account NCRLwA7f)
Invalid operands to binary expression ('ifstream' (aka 'basic_ifstream<char>') and 'char (*)[26]'
 
heres my 1st part of programme #include <iostream> #include <fstream> using namespace std; void ge...
[4 replies] Last: @tpb thankssss it really helps !!! (by Newbieess)
Super long program, how to optimize?
 
Hey so I'm doing an assignment (https://imgur.com/a/qykyQ) and I'm done with everything except the ...
[5 replies] Last: References can save typing and eye strain with zero cost: void vIniti... (by dhayden)
A function that counts the different words in two strings
 
Hello! I'm trying to make a function that uses a counter and checks each word (characters in between...
[2 replies] Last: Actually that can get kinda complicated, depending how rigorously you ... (by Ganado)
What is wrong with my code?
 
Below is my code, and I can't get it to compile. It keeps giving me an error on the line that says "...
[5 replies] Last: I used your help to figure it out. Thank you very much (by ChrisK312)
Initializing a 2d object array with its array position
 
I'm creating a sort of cellular automaton and I'm looking for a convenient way to initialise a 2d ar...
[3 replies] Last: Not sure if you can avoid explicitly writing out the loops. It's l... (by NotToday)
Prime Number Print
 
My prompt for this specific code is as follows, "Prime numbers. Write a program that prompts the use...
[2 replies] Last: from the project euler website by chance? This is a good read and nic... (by icy1)
Question On arrays in functions
 
Hello, working with some functions today, I ran into a few problems and found out that I don't reall...
[1 reply] : Woo and Foo are two ways of saying exactly the same thing. Even if you... (by tpb)
by cidex
Find number at certain position
 
Hello I have to make a bingo lottery game. So I have two text files with 25 numbers that are random...
[3 replies] Last: cidex, you can just make more structures to better arrange certain str... (by icy1)
Pesky ol' Vectors
 
Program has to put evens into one vector, odds in the other, and output them. I currently have this ...
[17 replies] Last: Well then it's not an extendable solution, and I go back to saying % i... (by Ganado)
Basic File Input/Output Test
 
Hi! I am trying to test basic file input and output functions. I was trying to write a very simpl...
[5 replies] Last: Oh wait, you aren't specifying a path for your program. If its runni... (by zaphraud)
by Vendal
Program runs, but not as intended. (functions)
 
Working on another school assignment! This one involves replacing blocks of code with functions that...
[7 replies] Last: From your function, playerCorrect . char guess; ... (by Repeater)
A few questions about headers
 
Hello! These questions have probably been answered a thousand times, but I really can't find a clea...
[3 replies] Last: Hello daverave1212, Expanding on what dhayden has said you may find t... (by Handy Andy)
Implementing a messaging system using one queue and 3 classe
 
Hi. I have an assignment that asks me to make a messaging system. These are the instructions. Mess...
[14 replies] Last: Yes, you're right. It doesn't need to be derived from one. I'll remove... (by ofeliedeceai)
by vladdy
payroll program question
 
Hello, I am trying to get my loop working but it's not printing anything out after fica withholding...
[2 replies] Last: Hello vladdy, After testing the program I found it useful to add the ... (by Handy Andy)
April 2018 Pages: 1... 22232425
  Archived months: [mar2018] [may2018]

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