Beginners - January 2017 (Page 7)

Help point me upon my journey :)
 
Hi :) I am new to the forums, I am currently in personal studies to understand the theory of C++. As well to be capable of using it, But that will come in la...
[2 replies] Last: Thank you :) It seems I am finally picking up the language. I just ne... (by TurboGrafx)
by Ekinne
C++ fraction numbers
 
Write a c++ program to display a message if the number entered is whole or fraction number when the user enters a whole number or a fractional number. Pls help ...
[7 replies] Last: Shh! I'm just messing with the guy because he excepts someone else to... (by cire)
recursive function question
 
Hi everyone,I'm on a chapter of recursion at the moment but the books example is poorly explain and I still don't know what is happening with this code, for ...
[6 replies] Last: In all cases you return from the function before line 20 is reached. ... (by cire)
the game of nim
 
Hello all, I need help with the game of nim. This is an assignment so I do not want it done for my how else would I learn. I just need a little help figuring o...
[4 replies] Last: use header file #include<stdlib.h> #include<time.h> // then in int m... (by bird1234)
Help with finding sum of digits
 
I am currently trying to write a program that causes Additive Persistance to happen based on the numbers give in an input.txt. I was given the correct outputs b...
[5 replies] Last: #include <iostream> int sum_of_digits(int aNumber){ int sum = 0;... (by closed account 48T7M4Gy)
Why can't I initialize int* with data
 
In c++, This works: char* a="ABC"; and this also works: char a ="ABC"; The first is a pointer so it can be reassigned. The second cannot be reassig...
[3 replies] Last: as a little diversion, something like this int* p = {1,3,4}; // inval... (by Cubbi)
Why can't I do ++*ptr with char*
 
This is the code: #include <stdio.h> using namespace std; int main(void) { char* c="XYZ"; int p = {1,3,4}; int* i=new int ; i = 1; i = ...
[6 replies] Last: > Are you trying to say that once I declare: > char* c="XYZ"; > I ca... (by JLBorges)
by Perru
Reverse of an input string
 
hey, I need help with the reversing a string. so if any could explain this to me /* Reversing a string */ #include <iostream> #include <string> using ...
[8 replies] Last: the function should not return anything. int main() { string s... (by keskiverto)
This vector assignment is too general, please help!
 
Original assignment : Given a file with a random number of lines and each line consists of a random number of integers. For example : 155 779 588 883 974 ...
[5 replies] Last: Thanks all. Because of all of you I was able to complete this assignme... (by Mandory22)
switch statment
 
this works but whats better way to do this? like is there anyway to just have the user type A,B,C,D, or F or am I asking to much ? #include <iostream> ...
[7 replies] Last: thanks that does look a lot cleaner (by cabigler)
Entering a (space) from user input skips the next part of code?
 
I can not figure out why in the beginning of my program if I type in a space it skips the next part of the program. For example my program asks the user to ente...
[3 replies] Last: Awesome, I appreciate the help. Thank you! (by pleaseINeedHelp)
How do I call a bool function in main?
 
Im currently doing an excercise where if the user enters two letters, A and B for example, it will output that A is higher than B on the alphabet. This is my fi...
[1 reply] : #include <iostream> bool IsAlphaHigher( const char& letterOne, cons... (by gunnerfunner)
One Function at a Time (Hailstone Sequence)
 
Good afternoon everyone, I'm currently working on the following program: // Tab stops: 4 //The program will use a given integer from the user to co...
[4 replies] Last: #include <iostream> #include <vector> int main() { std::cout <<... (by gunnerfunner)
read a specific line from the file
 
hi, well first I sorry if my english is not very good . In this homework from my university is about that a family what want visit the cities starting in a c...
[2 replies] Last: ok, in that part (in that part that you have no idea) I mean what the... (by JOSEluis2796)
Hollow Rectangles
 
I have made a program that makes rectangles of a specified height, width, and character. What I want to do is make it "hollow" but I have no clue how to go abou...
[2 replies] Last: Thanks lastchance. It didn't work at first but I guess my compiler did... (by closed account 3vX4LyTq)
Input needed on starting an assignment.
 
Hello, I need assistance on starting writing my code, the direction states that the input will be taken from standard input, and so we need to define a book,...
[4 replies] Last: At 13 digits, a valid ISB number will be too large to store in many pl... (by mbozzi)
Arrays and Pointers C++ (Question + Reference)
 
I wrote some obvious and also tricky stuff that is used for arrays and pointers in c++. Hope this can be a good future reference on the web. I have some ques...
[11 replies] Last: [quote=Kourosh23]So you mean pointer should only point at one integer ... (by Peter87)
newfile.c:1:20: fatal error: iostream: No such file or directory
 
Evertime i try to run or debug my program that pops up.PLS respond ASAP. #include <iostream> using namespace std; int main() { // Written by: Joe Vard...
[10 replies] Last: i said to hell with netbeans and switched to visual studio and it work... (by jvardam)
by GG96
Using Selection Sort With A Two Dimensional Array
 
Hey guys, I know how to use selection sort with a one dimensional array, but I can't figure out how to change it so that it will work with my two dimensional ...
[4 replies] Last: Thanks gunnerfunner, but unfortunately we can't use std functions for... (by GG96)
Instantiating a class template on the heap
 
Stroustrup writes that "If explicit use of the heap is undesirable, templates have an advantage over class hierarchies." ["The C++ Programming Language", 4th Ed...
[2 replies] Last: He isn't saying it's impossible to place a instance of class template ... (by Cubbi)
January 2017 Pages: 1... 56789... 24
  Archived months: [dec2016] [feb2017]

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