Beginners - December 2014 (Page 2)

Adding to a number's figures for it to become a palindrome
 
Hi. I've been trying to do this for about 3 days but I just can't figure it out. I want to make a program that adds to a number's figures for it to become a pa...
[1 reply] : If I were you I would put the chars in a std::string or a char array a... (by ajh32)
header file and cpp's
 
example: main.cpp #include <iostream> #include "board.h" #include "board.cpp" int main() { //function calls } board.h #ifndef BOARD_H_INCLUDED #define B...
[3 replies] Last: > do i really need to include cpp files on main function? no, don't in... (by ne555)
Palindromes Help
 
I'm brand new to C++ and I have a little Java experience. I am testing for palindromes and I want to compare an array to itself inversely. Is there a function...
[4 replies] Last: I know what a for loop is... but is char c : str == char c = str ? (by Tenom722)
Done, but where do i go?
 
Hello, i just got done reading 2 books about c++. But i still dont know where to go from here.. I have kinda problems reading/making codes like dlls and stu...
[3 replies] Last: Thanks, i will :D (by Marrern)
reference array
 
void iniBoard(signed char& ); i always getting an error when im declaring a function like this. whats wrong with this?
[5 replies] Last: [quote=Lorence30]i see, the var name should be also inside the () and ... (by Peter87)
How can I assign an address to a pointer that is a member of a structure?
 
I understand the concept of pointers declared as structure "variables". But I'm a little stuck when it comes to understanding members that are pointers in a str...
[8 replies] Last: Had same problem. Thanks a lot. Now try to fix. (by fireglow)
Question about #include "something.h"
 
I am currently trying to write Tic Tac Toe program. In the code, it includes #include "tictactoe.h". However, I do not know its functionality nor do I how to cr...
[1 reply] : .h files contain the "declaration" of functions or classes .cpp files ... (by Nezar)
Relational Operators and Arrays
 
Why doesn't my code print out "Wow"? I know it is a simple question but I think there is an important lesson that needs to be learned here about the nature of r...
[4 replies] Last: Thank you guys. Very helpful. I see my mistake now. (by jhykima)
Error Line 31
 
Write your question here. The program complies and executes. However, the IDE says for line 31 "error: braces cannot be omitted for this subject initializer" ...
[5 replies] Last: Thank you all for your response. I feel honored to receive the attent... (by phztfte1)
Select and Perform Math Option
 
I am trying to ask the user to select add or subtract and then after it selects add or subtract, then begin to perform the operation, using Main in 5 lines in C...
[11 replies] Last: Your code works. All you have to do is put it in a void function, then... (by Sweats)
some mistakes
 
I create this code everything seems to be fine, but when I check the results, the center of gravity is always 1 or 2 units higher that the value that must have ...
[1 reply] : Hi, [code firstline=55]int cenfun(int arrX , int arrY , int size) { ... (by TheIdeasMan)
Reading and writing TXT file
 
Hello! Yet another question of these, and trust me, i've been trying all solutions on the page regarding this topic, but nothing works. MY ASSIGNMENT I have a ...
[11 replies] Last: I actually recommend a few changes: #include <iostream> #include <f... (by jlb)
Need help with an error message while using asctime_s
 
Hi, I am trying to create a timestamp that outputs the current time to the user. When I run my program currently I am getting the following error. Please se...
[5 replies] Last: I really don't understand what you don't understand (from the page you... (by jlb)
Avoid returning dynamic arrays from functions?
 
Hi! I have function: const wchar_t * CharToWChar( const char * text ) { unsigned size = 0; while( text[ size++ ] ); wchar_t * wchar_arr = new wch...
[10 replies] Last: Ok thanks, I'll use string and wide string, or just return smart point... (by TheHardew)
templates+member function pointers, please help...
 
Hey This code creates an array with pointers to member functions #include <iostream> #include <string> using namespace std;using namespace std; class...
[1 reply] : foo <int>* da = new foo <int> (15) ; //da ->showRec... (by skorefish)
by Lee125
Array one dimension
 
Hello guy. can you help me I confuse in line 16,17,18. Why lastly the output is more than three. where does the value of 8,3,-1 come from? #include <io...
[1 reply] : Here is a hint: #include <iostream> void status( const char * name, ... (by keskiverto)
one dim array - smallest element & index
 
The question is as follows: Write a C++ Program that ask the user to enter array size , then declare an integer array with the same size that the user entered...
[1 reply] : int s; // s = size number int index = 0; int array ; ... (by Yanson)
pointers
 
is it making a new copy of memory adress (or variable) when passing a pointer on function? if yes , so it is wasting more memory than a passing normal variable?...
[7 replies] Last: Smart pointers: search with that term or look at the "managed pointers... (by keskiverto)
Using a word in C++
 
I'm having a problem scripting a program in C++. My goal is to have a basic username and password input/output system. I haven't been doing this very long so I ...
[2 replies] Last: I'm not going to lie, it's a little disappointing that the solution wa... (by Braksnen)
Sum function
 
Why this code is not working ? #include <iostream> using namespace std; int sum(int a, int b) // int add_two_integers(int value_one, int value_two) { return ...
[5 replies] Last: I will check enshallah Anyhow thank u 4 your effort (by AHMEDiii)
December 2014 Pages: 1234... 55
  Archived months: [nov2014] [jan2015]

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