Beginners - January 2016 (Page 7)

Exponent calculator with multiple outputs
 
Ok, so I have the general guts of the code figured out.(Or so I think.) I have to have a calculator that displays the exponent or a number. However, the result...
[16 replies] Last: Hi, Your program works when base is 2, but what if the user put in so... (by TheIdeasMan)
Help with shapes?
 
Hi! I'm very stuck on some code and I could use a bit of help. Square::Square( const float width , const Point origin ) : width( width ) { _origin = origin...
[2 replies] Last: The code compiles fine with C++11. If you can't get a C++11 compiler t... (by dhayden)
Class Variables question about operand errors
 
Hello all, I am in need of some assistance for this assignment I am having a problem fixing this to compile correctly. I am getting errors with line 30,31,32 ...
[6 replies] Last: Now that works like a charm! I had it so close. I thought the error wa... (by stilts9119)
by alitt
why sum is 0
 
hey guys im gonna calculate but i dont know why sum is 0, #include <iostream> #include <conio.h> using namespace std; struct calc{ int num; ...
[13 replies] Last: really really thanks again (by alitt)
by shuboy
Sorting
 
struct space { string name; int value; } a ; i want to sort the array by string name , how can i do it ?
[1 reply] : You should get an idea from this example: // Example program #includ... (by ChajusSaib)
Help Reversing a Stack
 
I need help reversing a stack using the pop(), top(), and push() functions, if someone could help point me in the right direction. Thanks! #include <iostre...
[1 reply] : think about how a stack works. All you need to do is copy one stack o... (by Bdanielz)
Next_Permutation()
 
I have several questions about vectors and Next_Permutation(). I ALMOST wrote a program that prints out permutations from a user input. A user inputs some...
[2 replies] Last: From "\http://en.cppreference.com/w/cpp/algorithm/next_permutation Tr... (by naraku9333)
Valgrind error and segmentation fault with fread()
 
I am making my first attempt at utilizing linked lists and dynamic memory allocation, and I have a function that is supposed to load a dictionary into memory so...
[4 replies] Last: @cire: Yeah, that was a really stupid mistake on my part. I just had t... (by btunde08)
Creating a function that totals the odd numbers and totals the even numbers stored in an array.
 
I am a C++ beginner and need assistance solving this problem. I have tried hundreds of different ideas but I can't seem to get it to take the numbers from the a...
[5 replies] Last: You're very welcome! (by TarikNeaj)
Direct screen writes in a console session
 
It would be easier to find something if I knew what I was looking for. I want to be able to put a character or string at a specific place on the 25x80 console ...
[2 replies] Last: Thank you. I'm set now. (by astroannie)
Help to get out of this problem in C++. (1,2)
 
Problem is:- Write a program that reads in ten whole number and then outputs the sum of only all positive numbers, sun of only all negative or zero numbers and...
[21 replies] Last: Now it is right and fully working program... #include <iostream> u... (by ZahoorKhan)
Adding consecutive numbers using a loop
 
I'm having some trouble with this program: #include <iostream> using namespace std; int main() { int n = 0; //counter int sum = 1; //output ...
[4 replies] Last: When I input 0, I get 21 as expected: --- Please enter a number 0 su... (by AbstractionAnon)
cant use telnet in my source
 
HI ALL! i want to write a simple code that can let me to telnet and connect to my modem so i wrote the code below but when cmd run it tell me telnet its no...
[10 replies] Last: As an amendment to the post from Shadowwolf , you need telnet server... (by Computergeek01)
Problems with vectors
 
Hello, guys I've been writing a ASCII rouge-like recently, when I stumbled on a strange bug. I have declared a vector containing a class I made. vector...
[12 replies] Last: That's something that should be covered by any basic tutorial or textb... (by MikeyBoy)
Instances
 
Hi I have an animation class and I need to use the methods inside my character class. How would I approach this? Kind regards
[5 replies] Last: Damn. There must be something wrong with my telepathy. I'm afraid yo... (by MikeyBoy)
Confusion about namespaces and classes in QT
 
Hi, I just started to learn QT5.5 and I kind of don't understand this simple thing #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> namespa...
[2 replies] Last: Ohh tnx man, I think I started to understand it tnx to you! This is t... (by etrusks)
Snake Game
 
I need help to make the tail, I've watched several guides but I can't understand how to do it. I need help with the logics and how I should print the tail and m...
[no replies]
Sorting array of pointers
 
Hello, it would be nice if somebody can help me. the problem seems to be trivial, but I don't see my mistake. There is class colony- an array of pointers to ...
[4 replies] Last: Moschops, Tomas, thank you! Indeed, the problem was in incorrect bubbl... (by unoduetre)
abotr trap 6 mac os x
 
I am tackling an exercise that finds prime numbers under 1000. It compiles ok but terminates with abort trap 6 and I do not know why? Can anyone please help!! ...
[2 replies] Last: Thanks very much!! Another school boy error :( Thanks again!! (by jamesfarrow)
I am doing right in C++?
 
I solved a problem given in my C++ book. The problem is given in this image https://i.imgsafe.org/de2f3f9.png . Am I doing right or wrong. #include <iostream...
[11 replies] Last: #Jilb Good idea... (by ZahoorKhan)
January 2016 Pages: 1... 56789... 29
  Archived months: [dec2015] [feb2016]

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