General C++ Programming - January 2015 (Page 19)

Number printing problem
 
how to make a program in which a user is prompted to input four numbers like 1234 and then print those four numbers one by one on screen using only one variable...
[1 reply] : #include <iostream> #include <array> #include <algorithm> using name... (by Konstantin2)
Draw at a position
 
I am making a multiplayer game with a server, and decided that I want to be able to type stuff into the console like commands. I've been searching google for ho...
[2 replies] Last: Oh no! I'm not making a multiplayer game in the console! That would be... (by Bingocat4)
by gkraft
eof
 
OK I'm making a simple program to make a shopping list. I would like the program at start up to load the previous shopping list that was saved as a text file. ...
[3 replies] Last: Funny debugging it... it skips over the while loop completely. And the... (by gkraft)
SDL_2 button.clicks field?
 
Hello, I am having some issues handling double clicking in SDL_2. I have tried and tried different methods, but to no avail. When I output the return value...
[12 replies] Last: Fixed that crashing error, it required manual compilation, man I was b... (by danielCodez)
BlackJack Program help
 
Two cards are dealt to each player. The dealer shows one card face up, and the other is face down. The player gets to see both of his or her cards and the tota...
[no replies]
by uymltp
Capturing audio with C++ using an external microphone
 
I need to capture voice with C++ for my graduation project. I looked up for it, I found 2 major solutions. Portaudio library and waveIn function set. I found th...
[2 replies] Last: WaveInHdr.lpData = (LPSTR)waveIn; This is wrong. lpData must point... (by Disch)
For loop help
 
include <iostream> include <fstream> include <string> include <stdio.h> include <stdlib.h> include <time.h> //These are what libaries this program needs t...
[1 reply] : If you put you code in code tags with some semblance of formatting som... (by mutexe)
by hanest
2 instead of 1
 
Hi guys, can anyone tell me how get my y[j-1] values to give me 1 or -1 instead of 2 or -2. thanks #include <ctime> #include <cstdlib> #include<iostream> #in...
[6 replies] Last: ah thank you, i didnt even know .at existed... im a newbie lol (by hanest)
by dianam
area of a triangle
 
Hello everyone! I have to write some cpp program which computes area of a triangle using cross product,we give 3 vertices as R2 and 3 edges as double. I ...
[5 replies] Last: > we have to use (A,z0),(B,z1),(C,z2) iirc, you've got points in R3. ... (by ne555)
SDL on Cygwin: Undefined reference to 'WinMain@16'
 
From my googling, a lot of people have been getting this error, but none of them solutions worked for me since I am using Cygwin. I have to learn the UNIX envir...
[6 replies] Last: If you're using Visual Studios, you can go to your properties. I'm no... (by SpookieDookie)
loop problem
 
here's my code sorry the box kinda cuts it off and puts it on the next line, but my problem is that in this do while looop the whenever the alien health or user...
[2 replies] Last: I tried both (by mercedec)
Removal of items
 
Should be fairly obvious what I'm trying to do with the below, posting it here on the off chance someone wants to try fixing it themselves while I take a break ...
[4 replies] Last: Fixed my code, updated the above to reflect so others can use my effor... (by awsdert)
A long long code ! Please see this.
 
Is there any short way to write this program ? Please note that we cannot use any string related functions. #include<iostream> using namespace st...
[5 replies] Last: What is a "string related function"? You can't use std::string? That's... (by bugbyte)
why x=1,PW,; Had a error ? -_-
 
#include <conio.h> #include <iostream> using namespace std; void balance (); void withdraw (); void deposit (); int x=1,PW,; char transaction; m...
[3 replies] Last: That's a letter 'l' not a number '1'. It's endl ine. (by MikeyBoy)
True false questions and Multiple choice questions in c++ using text files
 
So im trying to create a quiz using c++ that incorporates three different types of questions. These are the standard one answer question, true false questions a...
[2 replies] Last: You could have a Question class, with a question string, answer string... (by tipaye)
Why is this error stating my variable is unintialized?
 
#include <iostream> #include <string> struct WeatherStats { double total_rainfall; int high_temp; int low_temp; int avg_temp; int avg_yearly...
[3 replies] Last: Or even keeping it as a struct, and using an initialisation list in y... (by mutexe)
Using Namespace
 
Why is using namespace needed in linux but not in turbo c++?
[1 reply] : It's not needed in Linux, Linux is an OS not a language or compiler. ... (by kbw)
Getting Segmentation Fault
 
Guys, I am getting Segmentation fault (core dumped) for the following code when I enter name . Please Help . Note: I am Using gcc Compiler #include<ios...
[3 replies] Last: Thanks Guys (by karthikrao10)
Problem with this!
 
Using two-dimensional arrays, write a program which multiplies an mxn matrix of integers by an nxr matrix of integers. INPUT FIRST (2x2) MATRIX: Type i...
[1 reply] : What code do you have so far? (by kevinkjt2000)
by fafner
Understanding llvm
 
I made a handwritten parser for a nontrivial programming language a while back, and all the time my intention was to try to use llvm as the backend. But all the...
[2 replies] Last: The simplest way of understanding SSA is that instead of having to wor... (by Duthomhas)
January 2015 Pages: 1... 1718192021... 24
  Archived months: [dec2014] [feb2015]

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