Beginners - January 2015 (Page 37)

Array Shift function [Help Needed !]
 
Write a function void cycle( double * array, int length) The function should move the values of the array up one postion, moving the last value to ...
[4 replies] Last: ahh Thanks for the term. any recommended good video tutorials on this... (by FootyInc)
Doubt in call by reference function
 
I have just learnt how to write a function....... but when I tried to make a two player battle function where each player gets a chance to hit other (just li...
[4 replies] Last: thank you... But can we use (Player player1, Player player2) I t... (by shadder)
Difference of standards & Which one to use it?
 
Q1. What's the differences between: #include <iostream> & #include <iostream.h> I'm confused! My textbook uses the latter standards... Q2. Is it an...
[1 reply] : I suggest you stick to standards only, .h are depreciated in c++ exc... (by closed account SECMoG1T)
File to array is not working
 
Hello, I'm trying to put the content of my file into an array and then cout it. But for some reason, the array couts only new lines but no text, or only hex-e...
[8 replies] Last: Thanks a lot mate! That was exactly what I needed! :D You were an awes... (by Nielyboyken)
by h4ever
how to get char array position from token
 
When I run this code and break it on the last line, I want to see position to which the pointer "token" points to. How to do it? char str = "gaussian;gauss...
[3 replies] Last: Do you know, that is is C, not C++? Also, you are not doing what I did... (by bugbyte)
'If' statement confusion
 
Hi everyone, new to the forums here - as well as coding in C++. Trying to make the old favorite number guessing game just to make sure I'm not completely te...
[2 replies] Last: Thanks man that's done it. And I wasn't aware of that, I'll try and st... (by Dowhnbeat)
pointers exercises
 
can someone give me exercises on pointers? or give me a link i was implementing my game with pointers but i dont know when or where to put pointers so i thin...
[6 replies] Last: @MiiNiPaa second is to be mutable non-owning references to objects o... (by xenovia12)
by anhnha
Format data using format string 'pszFormat'
 
Here is a section code in cstring.h to format data. It seems to be very complicated for me (just knowing basic about C and C++). Could you tell me what should...
[7 replies] Last: Thanks for the reply! Variadic arguments allow a function to accept an... (by anhnha)
Debug" uses an invalid compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
 
I am working on a project in C++ but I am having some difficulties. When I try to build/compile my program I get an error message that says " uses an invalid co...
[1 reply] : What IDE are you using? Are you sure the compiler is installed? (by Peter87)
Sorting letters in a string/ comparing strings
 
Hello Guys! Super Beginner here! I just want to ask about sorting letters in a string. So below is the code that i've done. Can you help me on sighting errors t...
[2 replies] Last: Ok Joe. I'll message you my code tight after I revise it. Thanks and G... (by Ishan23)
by Deeler
Getline gets 2 words at a time while searching for ' '
 
Hello, I've got problem with getline(), I'm trying to load all words to vector from a file. fstream plik; plik.open("plik.txt"); string x; ...
[3 replies] Last: inf.txt: w - 199 r - 114 o - 111 n - 110 g - 103 ; - 59 //discard ... (by anup30)
Accumulator difficulties
 
The code is nowhere near finished but, my accumulator isn't working for health and boss_health and I was wondering why #include <iostream> #include <string...
[3 replies] Last: You are passing your parameters by value, meaning that the functions r... (by cire)
C++ Primer doubt
 
Hi, I am a beginner c++ programmer. I just started c++ primer and am working on the exercises in the first chapter. I am stuck on the first exercise problem rel...
[4 replies] Last: Do I simply save the code as sales_item.h in the directory; and then ... (by dhayden)
by nasser
invalid types ‘int[int]’ for array subscript
 
I'm trying to make a simple console RPG game This is .h file #include<iostream> #include<cstdlib> #include<ctime> #include<string> using namespace ...
[3 replies] Last: .h file Lines 1-3: I don't see any use of iostream, ctime, or cstdli... (by AbstractionAnon)
by adi94
Problem reading from file
 
Hay, I have a problem with the below code: heder.h #ifndef HEDER_H_ #define HEDER_H_ #include<iostream> #include<string.h> #include<stdlib.h> #i...
[no replies]
Undefined Reference to Function
 
Hello. I have been learning C++ for about 2 months and I have a problem with a program related to the game bulls and cows. The purpose of the program is to dete...
[1 reply] : http://www.cplusplus.com/forum/general/113904/#msg622050 string int2... (by ne555)
Array of ten ints
 
Hello, I decided to move on with the exercises, here was my task: 1. Allocate an array of ten ints on the free store using new. 2. Print the values of th...
[3 replies] Last: int* a = new int {100,101,102,103,104,105,106,107,108,109,110}; You... (by bugbyte)
Making an one-line input
 
Hello I was wondering, some applications do have a one line input. Like: myApp -o file.txt --extraOption 4 --amount 425 However, I always make my inpu...
[5 replies] Last: That's it bugbyte! Exactly what I needed. Thanks a lot! ;-) Also than... (by Nielyboyken)
Why am I not getting anything on screen?
 
Im trying to get a randomized slot machine to work. But I can seem to get the symbols to show up on screen. Anyone have any solutions? char matrix ...
[2 replies] Last: Is this by any chance what you are trying to achieve? I advise using s... (by bugbyte)
Can't firgure out member function error
 
I keep getting the member function error and have no idea why. Perhaps someone here could be of help. down.h #ifndef down_h #define down_h #include <string>...
[4 replies] Last: That makes a lot of sense. Thanks again! (by bandito)
January 2015 Pages: 1... 3536373839
  Archived months: [dec2014] [feb2015]

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