General C++ Programming - March 2015 (Page 12)

hangman game (sloppy code warning im new)
 
ok so the thing is that i have been working on a hangman game and its going good besides one problem i cannot figure out how to show all the letters that have b...
[4 replies] Last: Which of the blocks of code are you referring to, OP or mine? What ty... (by tipaye)
by SCB3
Having trouble with multi dimensional arrays
 
aaaa
[4 replies] Last: yep you were right, I've changed it to an if else loop (by SCB3)
Help with search function?
 
So I've got this part down ___________________________________ #include <iostream> #include <string> using namespace std; struct Node ...
[2 replies] Last: To add to @Jaybob66. Put all your code between codetags, its under "fo... (by TarikNeaj)
console notepad just doing some functions any one better than this ???
 
#ifndef ABC_C #define ABC_C #include<iostream> #include <stdio.h> #include <conio.h> #include <windows.h> using namespace std; struct CurPos { ...
[2 replies] Last: n what about compressed one :D #ifndef ABC_C #define ABC_C #ifndef A... (by Hassan ali khan)
by bjgza
Multiple datastreams created at runtime
 
I have a code producing multiple objects of a class "Item" at runtime, and would like to create a datafile associated with each. These files need to be written ...
[1 reply] : A stream cannot be copied. It makes not much sense to create an item w... (by coder777)
Strings
 
what does the error mean. My program works somewhat efficiently but it keeps giving me this error. Error: stringToChar: string must contain exactly 1 non-whi...
[5 replies] Last: @tipaye How did you determine what stringToChar() parameters are? It's... (by Jaybob66)
while loop trouble
 
i want to play this game my teacher has helped us create, Devil's Dice. my problem isn't getting the game to work, its getting the game to replay itself at the ...
[2 replies] Last: you may like to reset gameOver to false before you start again. i wou... (by Jaybob66)
c++ using classes
 
hello , im working on a program that tries to solve the partition problem: given n positive integers, partition them into two disjoint subsets with the same su...
[1 reply] : Your MySet should probably have a bit more interface. As to the probl... (by keskiverto)
problem socket
 
why my compiler did not recognize this header <sys/socket.h> and how to result this problem thanks a lot for reading
[6 replies] Last: @TarikNeaj : I always google.. before posting anything in this website... (by closed account 28poGNh0)
Nested for loops
 
#include<iostream> #include<iomanip> using namespace std; int main() { for (int i = 100; i <= 200; i++) { for (int j = 0; j <= 4; j++) { ...
[6 replies] Last: I GOT IT! ^_^ int main() { int i; for (i = 100; i < 200; i+=5... (by hazelkiss89)
Stuck in a loop
 
I can't get out of my loop to fill the array. This array should stop and print after 10 inputs. but it keeps on going. This is what my code is supposed to do....
[9 replies] Last: thank you so much. it worked. @yuzhengtian Thanks everyone (by gbEncode)
why is this function going infinite?
 
4120670000624855 = cardnumber I expect 23... but going inifinte... int CardValication2(long long int cardnumber) { bool zero = true; long long int a, tot...
[5 replies] Last: Hey, If you ever need help again and post on this forum, please put yo... (by TarikNeaj)
Getting Prime Factors of first 1000 numbers (1,2)
 
I need to write a few C++ program as a practice problem for my book that I'm learning out of (Jumping into C++). Right now I want to focus on three of them, t...
[24 replies] Last: with factors: #include <iostream> #include <cmath> #include <string> ... (by anup30)
enter array element until pressing enter (1,2)
 
#include<stdio.h> int main(){ int list ; int i = 0; int input; while (i < 50){ scanf("%d",&input); if(input == '\n') break; list = input; i++; } int a;...
[20 replies] Last: gets_s() is optional; a conforming implementation need not have it. ... (by JLBorges)
static and non-static const int
 
Are there any differences between x1 and x2, x3 and x4, x5 and x6? When can I skip "static" word? const int x1 = 1; static const int x2 = 2; void foo()...
[5 replies] Last: It is internal: [quote=Standard] 3.5 . 3 A name having namespace scop... (by MiiNiPaa)
Class Functor - Please help! :(
 
Hi, I have the task of writing a class that stores a series of numbers. The length can be set in a constructor, all numbers will be floats and be within the r...
[no replies]
by srowe
new C++ Standard question.
 
I tried inline operator overload and I got link errors. Is this because of the new C++ standard? I did it years ago no problem. Anyone know?
[2 replies] Last: Inline operators/functions need to be defined in the header. (by Peter87)
Back to the loops
 
Hey guys, I'm back. I brought this to my little nerd group and we tried it out for the random treasure generating. The problem happens around lines 517 and ...
[6 replies] Last: We all do buddy :) Just keep working hard and you'll get better and be... (by TarikNeaj)
Upper Tringular Matrix
 
Hallo, I will get uppertringular part of a matrix.For example ı have a matrix : 1 2 3 4 5 6 7 8 9 ı will register as 1 2 3 4 5 6 9 in an array.This is ...
[7 replies] Last: Oh, I'm sorry, I didn't know what upper triangular is Besides, memc... (by Gamer2015)
cstdio to stdio.h
 
how to change the following code from C++ to C? It is the code of acm:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=18976#problem/J #include <cst...
[14 replies] Last: ok thanks (by sirrunrun)
March 2015 Pages: 1... 1011121314... 28
  Archived months: [feb2015] [apr2015]

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