General C++ Programming - February 2016 (Page 4)

What does "array decays to pointer mean"?
 
What is the meaning of "array is not a pointer and pointer is not an array BUT an array decays to a pointer"? Also, I know that for an array int A ; A on it...
[4 replies] Last: > I know that for an array int A ; A on its own is a pointer i.e it c... (by JLBorges)
Reason for not being able to set pointer-to-pointer = 2D array
 
I have thought and read about this for a while now. An int **p cannot be set equal to int A by doing p=A even though it is possible to create a 2D array from ...
[1 reply] : http://www.cplusplus.com/forum/general/185480/ (by Duthomhas)
Static Stack program?
 
hey guys, i'm new here, and I really need help on an assignment. I'm completely lost on static stacks and linked lists, and this is what he wants us to do. can ...
[2 replies] Last: To attack a problem like this, read the assignment and make notes of t... (by dhayden)
C++ Summing large numbers using string
 
Hi guys, for a competition I needed to store large numbers (>20 length) and to add them with other large numbers. So i made this code: //add.cpp #include <io...
[2 replies] Last: Thank you for your code and advice :) (by Mastaron)
by moot
Not Getting Correct Output for Histogram
 
For this assignment, I need to get grades (0 < grades < 100) and store them into a vector. After, I need to see how many times a certain number was entered. The...
[4 replies] Last: +1 MikeyBoy . In this case, I found the bug by adding a function to ... (by dhayden)
What is this error?
 
ld: fatal: symbol 'main' is multiply-defined: (file /var/tmp//cceZjOcX.o type=FUNC; file /var/tmp//ccYgP5zV.o type=FUNC); ld: fatal: symbol '_Z4menu...
[6 replies] Last: http://www.cplusplus.com/forum/general/140198/ Post your code and you... (by ne555)
How to I clean up my code? It's a mess! I can't even develop it further. (1,2)
 
I've been working on this project for a while and I've added quite a few features. The only problem is, the more I work on it the messier and more hackish the c...
[33 replies] Last: Yeah, all of them are necessary. The program will not run (properly w... (by TheIdeasMan)
by Frenzy
Calling a function from within a Function???
 
Hey guys. So my teacher asked us to create 4 different Functions use in a Rock. Paper, Scissors game. getPlayerTurn, doComputerTurn, showOutcome, and playGame. ...
[3 replies] Last: I feel like such an idiot... thank you so much. I appreciate that you... (by Frenzy)
Output a Pattern of stars using recursion - stuck for hours
 
I've got an assignment due in about 5 days, and this is the last task I can't solve. I've gotten it to print **** *** ** * * but I need 3 more lines, ** *** *...
[4 replies] Last: What if, hypothetically, the setfill+setw is implemented with for loop... (by keskiverto)
Why Queue can't take(push) a string??
 
So it seems that this queue can't take an array of strings ? I am suffering in making the " char " to be strings....and I am even suffering in making the str...
[3 replies] Last: Yes jlb and TheIdeasMan , sorry about that. So yeah, there you go, ... (by AmmmG 01)
by Huako
Creating Folders/Directories
 
What im trying to do is to create a folder/directory using the user input, the path is writing correctly(I think) but the folder is not been created. Here's the...
[3 replies] Last: nvm I don't know why but it work, can some one plz elaborate why it so... (by Huako)
issue with a prime number program
 
my program is having issues finding prime numbers. this is my program when I input 1 it shows up as a prime number and some other problems may lay in here as...
[5 replies] Last: You initialise prime to true. If x is 1, you don't do anything to... (by MikeyBoy)
by poqwe
only 1 loop will be used, for loop..
 
my code sir is #include<stdio.h> #include<conio.h> void main(){ clrscr(); int count=1; for(int i=1;i<=8;i++){ if(count<=8){ if(i==1){ printf("%d",i); ...
[17 replies] Last: hmmmm im just asking some knowledge about programming sir... my course... (by poqwe)
Putting data into a private object.
 
I am having trouble with putting my data into an object. Here is my code: .h File: #include<iostream> #include<string> #include "date.h" #ifndef FRIEN...
[5 replies] Last: The compiler won't have created duplicates. In the code you were tell... (by MikeyBoy)
Need help with programming assignment.
 
I'm a complete newbie to C++ and only know some basic functions, my professor on the other hand must think that we all understand this language and what he's te...
[9 replies] Last: @Mazino013, @ibrahim069 Please post your question in a new thread of ... (by Chervil)
Need help cpp program to cut and print column from csv reports
 
Hello All, I am new to c++ coding.Can anybody help me out with this. i want a CPP program to cut and print column from csv reports. please help
[1 reply] : I think you should read this first. http://www.cplusplus.com/forum/beg... (by Thomas1965)
What is wrong here?
 
Hello guys! Please take a look at this program; I do not know what the actual problem is!
[4 replies] Last: The easiest is to set a breakpoint in the destroyList function and ste... (by Thomas1965)
by Kubani
Smart pointers
 
Hi, Please have a look at the code below. Is this a smart pointer ? If so, why the first object, p1 , is dangling at the end of the code? (That is p2 is de...
[11 replies] Last: You guys, are right. I added the system ("pause"); inside the destr... (by Kubani)
Templates
 
I've never used templates much, although I do know how to do the basics with them. I'm making a class which takes one type of input and converts it into a diffe...
[2 replies] Last: That's a really clever solution, thanks. So that I fully understand ho... (by shadowmouse)
How to loop from input.txt
 
Hallo.. I need to write this basic program. And I want it to read my input file from a txt file containing the following: 12345 R 790 29888 X 38116 P 37...
[1 reply] : > I need to write this basic program. ¿what should the program do? >... (by ne555)
February 2016 Pages: 123456... 21
  Archived months: [jan2016] [mar2016]

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