Beginners - January 2016 (Page 23)

by Nanyo
relative paths not working
 
Hello Everyone! Thanks for the help in advance! I am trying to write a primary quiz program. My problem is on lines 35 - 40. I do not get an error message its j...
[7 replies] Last: oh my god the working directory is C:\Users\Nanyo\Desktop\A453 Quiz... (by Nanyo)
Please help
 
I was creating an factorial program that's only accept numbers from 1 to 10 so i did write an if statement like this: if (num >= 1 || num <= 10) {hhh ...
[3 replies] Last: One way is to get the input first into a string and check if every cha... (by Thomas1965)
by tonyff
I need help with C++ ( mac user)
 
How come C++ in Xcode looks so different than regular c++ on windows or code::block The first code is from Xcode and the second is from code::block whats up...
[1 reply] : \n just means you want a new line. So if you would write after the \n ... (by TarikNeaj)
Can't find error in a structure initilization
 
I am writing a program that asks the user to enter the expenses for each season of the year, and then sum the expenses. The thing is, I have to do it by passi...
[4 replies] Last: Thank you, now it works fine, but I don't get why can I pass an array ... (by sambalsam)
Poblems in pythagorean triples
 
Hi, I'm trying to write a code that produce all the first 100 pythagorean triples but by the time I'm only capable of obtain the first one (3, 4, 5) and I don't...
[8 replies] Last: Or this? #include <iostream> #include <cmath> int main () { doub... (by elaleph)
trying to output the word left it's important
 
See the code in the middle, I'm trying to make guess1 (if passes test) equal left so when it goes in cout guess1 is really left and left prints at least "l" lit...
[no replies]
??
 
So i might get shamed for putting this (first time posting on here) but can i have a link for a good place to test my code?
[5 replies] Last: IMO, the clang compiler from llvm is one of the best freely available ... (by TheIdeasMan)
by g3n0m3
double pointers
 
so I have this code for inserting a node in a binary tree what I didn't understand is the use of double pointers, why doesn't work with regular pointers ptr = ...
[no replies]
Why does it skip if and just print it?
 
When ever I run it skips checking and just runs the cout what do I do? #include <iostream> #include <vector> #include <string> #include <fstream> #i...
[10 replies] Last: @ AbstractionAnon Hi and I hope you have had an excellent festive se... (by TheIdeasMan)
Efficient 'for' loop
 
Hello, I want to know if there is a difference in performance of the below two 'for loops'. I know that the complexity of std::string.length() is constant ( ...
[3 replies] Last: Thank you for both the replies. I am actually nervous sometimes while... (by saherch)
Timer for my Maze game
 
I am very new to c++ and I was given an assignment where I was asked to make a maze. I would like to add a countdown timer to my maze but I'm not sure how or wh...
[5 replies] Last: Thanks for your help. :) BUT could you please explain to me what you m... (by tiffanyI)
by xx1182
For anyone who knows sdl, a little help?
 
What is wrong with this? SDL_Scancode Game::keys = {SDL_SCANCODE_W, SDL_SCANCODE_A, SDL_SCANCODE_S, SDL_SCANCODE_D}; keypressed = SDL_GetKeyboardState(N...
[3 replies] Last: Solved by myself void Player::Update(SDL_Scancode key , const Uint8 ... (by xx1182)
by GonlyG
Empty Output in Random Generator
 
random generator: take a random 4-digit number, then square it, then divide it by 100, then take (minus) the remainder of division after divided by 10,000. Coun...
[13 replies] Last: Okay, this is much more organized and actually gets extremely close to... (by GonlyG)
Looking for solution book
 
Hi guys. i have been studying ( data structure using c++ ) from d.s. malik book, so i am looking for any solution book resolving the examples to study it to...
[no replies]
Help to create the right condition
 
Need to make rook's possible moves, but don't know how to make the right condition. char x; int y; bool menu = true; cin >> x >> y; x -= 97; for...
[2 replies] Last: Since a rook can move only up or down vertically and either left or ri... (by Thomas1965)
by ajens
Pointer to a 2D Array as a Function Parameter
 
Hello, I am having a hard time with a problem. Basically, I am to create a pointer to a 2-dimensional array of ints, say 3x3, and then this pointer will be u...
[5 replies] Last: coder777, where I'm having trouble is I'm supposed to pass a pointer t... (by ajens)
Help me fix this program please
 
I encountered some problems writing this code can you help me fix it please #include <iostream> #include <stdio.h> #include <math.h> int main() { ...
[14 replies] Last: Well, it depends on whether it's the physics or the computing which ... (by newUser3940)
Linked List - some basic questions? (1,2)
 
Im just now starting to self-study linked lists. Please keep in mind that I am a complete novice as of now regarding this data structure. I have some question...
[26 replies] Last: In order for the list to be reversed, the head pointer must point to t... (by cire)
by Radar
Getting a logic error in my programming
 
#include <iostream> void clearScreen(int lines) { for (int i = 0; i < lines; i++) { std::cout << std::endl; } } struct shipSetup{ int xc...
[1 reply] : The program never gets out of the while loop on line 58. while(valid... (by Thomas1965)
Computing perimeters,area,Phytagoream Theoram
 
I need a program that can compute the width,height,lenght of Triangle,Square,Rectangle,Quadrilaterals,circle PERIMETERS FORMULA.Then the next is the width,heigh...
[14 replies] Last: system("cls") can be bad for two reasons. First, it's much slower than... (by dhayden)
January 2016 Pages: 1... 2122232425... 29
  Archived months: [dec2015] [feb2016]

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