Beginners (Page 14)

Cast to different uint possible?
 
I want to write such a function, which depends on the encodingType (We just consider the int: 0, 1, ...
[7 replies] Last: I don't think my idea works very well after all. It's easy enough to p... (by dutch)
by Bopaki
Why can't I display all the nodes from myList
 
When I run the program only the last node is displayed Enter a list of integers ending with -999...
[4 replies] Last: Its all sorted out now.... Thank you all!!! (by Bopaki)
INTEGERS -- SUM
 
M adjacent integers M1,…,MN are inserted in a circle the following operation can be done M-1 tim...
[8 replies] Last: No. No code. No ideas. [quote=Mikeyboy]If this is a Codechef problem, ... (by keskiverto)
Pig Latin Name
 
Hi! I am reviewing the things I learned in the first half of my CPP class for this upcoming semes...
[3 replies] Last: vector<bool> table(256) = {false}; table['a'] = true; //you can hard c... (by jonnin)
Checking for harshad numbers
 
Hi, I'm trying to write a program that will take in an integer N, then, starting from N, loop to a ...
[16 replies] Last: Huh.. okay yeah that is pretty sick (by highwayman)
friend
 
Why does this program doesn't work?? #include<iostream> #define pi 3.141592654 using namespa...
[3 replies] Last: So there isn't. That's me told for reading it too fast. (by Repeater)
const member function
 
I am wondering why the const member function .get() has to return a const value, and need to pass by...
[1 reply] : > For example, int get() const {return x;} won't work it does work. ... (by ne555)
Understanding const variables being "local to a file"
 
Hello, In c++ primer 5th ed, it mentions that const variables are local to a file because the com...
[4 replies] Last: @Niccolo, I think you should write a blog. You always supply lots of ... (by mbozzi)
get value attribute from other class
 
Good morning, I instantiate class A and set its own attribute (example A.pippo) in main.cpp. How c...
[1 reply] : #include <iostream> struct A { explicit A( int pippo = 0 ) : pip... (by JLBorges)
by medosz
Square with while statement
 
I am struggling with this program. It reads the size of the side of the square then it should print ...
[9 replies] Last: Thank you, I got it (by medosz)
Can you help me?
 
I couldn't find the problem. Can you help me? #include <stdio.h> #include <stdlib.h> int mai...
[4 replies] Last: there is an fmod but I have not ever had a use for it. are you trying... (by jonnin)
Format questions
 
I'm curious to why when using functions to call a file. one uses ostream& and not ofstream& - althou...
[3 replies] Last: > I'm curious to why when using functions to call a file. one uses ost... (by JLBorges)
Help with ofstream within a function
 
Hello all, I have this code and I can't figure out why my ofstream isn't working as it should...
[15 replies] Last: Although it doesn't make a difference in your specific case to use ofs... (by dutch)
casting and reading from binary files
 
Hi guys, I have a function that writes data to a file,that data is two strings and an int, I do thi...
[5 replies] Last: keeping the casted stuff around makes it simpler to read and handle. ... (by jonnin)
Computing using Arrays
 
Hi guys, I wish to know, how I can use each of the digits of a 15 digit code supplied by a user t...
[10 replies] Last: they both work. I found 3,3,7 easier to think through I think you mi... (by dutch)
About the back() function of std :: queue
 
Please help me, why c ++ stl defines the back() function for std :: queue to get the value of the la...
[4 replies] Last: Thank you everyone for giving me the answer. (by cegodica)
cin.getline Clearing Input
 
So I've been assigned for a c++ class to put together a program that will encode or decode a caeser ...
[2 replies] Last: Why do you mix code associated with using namespace std; Alongside ... (by closed account 367kGNh0)
error message on inheritance
 
I am trying to learn C++ and when I compile I am getting the following error messages: invalid use...
[6 replies] Last: Thanks so much Niccola. I saw my errors. That was time saver. Thanks f... (by mekbibb11)
Scramble Middle Letters (1,2)
 
The task is to take any word that is longer than 4 and scramble the middle letters The following is...
[21 replies] Last: @ Ganado I wasn’t sure posting the scrambled text would be very rea... (by Duthomhas)
Overloadedoperator was fine and now..... nope!
 
C++ Team, (I guess that's sort of like the A-Team but twice as better!!) I have an overloaded out...
[9 replies] Last: Ok Dutch, good example. Even though pre-processor "activities" are f... (by Xanadu4ever)
Pages: 1... 12131415
  Archived months: [jun2019]

Cannot post in this page. To post a new message, go to the first page.