General C++ Programming - October 2014 (Page 11)

Algorithm to read duplicate array elements, return first duplicate value only
 
Hello, I'm sorry if I am asking such a dumb question but this has been annoying me for some time now. I have an algorithm which uses nested for loops, which loo...
[6 replies] Last: zoran404 You genius, I have been at this for about 1 and a half hour... (by ANewbieCplusplus)
output stream acting weird
 
I am trying to program a stack based linked list. Something very weird is happening with my program. Whenever i want to print with cout<< in specific places, it...
[7 replies] Last: ooooooooooh, now i see lol. Thank you guys. (by armonsafai)
Get Day of the Week Program
 
How can I check for an invalid date when I run the program? I am trying to enter a conditional statement that checks for a valid or invalid date. Programing ...
[1 reply] : For validating days and months just check if they have values from 1 t... (by zoran404)
Menu class. Need to add "Go back to previous menu"
 
Here is a simplified version of my Menu class, where submenus can be inserted arbitrarily deep. I need to add a new functionality "go back to previous menu", w...
[3 replies] Last: Thanks JLBorges, for the idea. I was searching so hard for a design p... (by prestokeys)
inheritance,class,c++
 
#include<iostream> using namespace std; class a { public: void add() { cout<<"in A"; } void fn() { add...
[5 replies] Last: yes i got it thanks (by sajid dayer)
by ScrubJ
Input from a file in CodeBlocks
 
Hi! I'm using Codeblocks 13.12 in Windows. I want to compile and run c++ files with the console inputs are automatically extracted from a file. More importantl...
[3 replies] Last: http://stackoverflow.com/questions/13295869/code-blocks-redirecting-in... (by MiiNiPaa)
C++ gettinng Segmenation fault
 
I was trying the question http://www.spoj.com/problems/JULKA/. I used vector to solve it i m getting right answer on codeblocks as well as on ideone.But gettin...
[3 replies] Last: @dhayden: B<=A The overflow in input{A,B}() is an issue @OP: /*165... (by ne555)
int* to int error?
 
Hey guys I keep getting an invalid int* to int conversion on lines 44, 48, and 51. Can someone tell me what exactly that is and how to fix it? Thanks. #incl...
[4 replies] Last: @MiiNiPaa Hey thanks. I got it to compile but for some reason it keeps... (by fl4pjacks)
by Zyxl
Learning C++ for building an application
 
I'm about to begin developing an application that requires some basic 3D rendering, so I'm looking into C++, as this seems to be the usual language for this typ...
[no replies]
by Jweim
For Loop; totalling input values
 
I'm having trouble figuring out how to total the values that are put in during the loop. For this program I need to add up the values the user inputs and then d...
[4 replies] Last: Thank keskiverto, sometimes you stare at these things forever and miss... (by Jweim)
Need help with program
 
This is my assignment. Write a program to simulate a deck of 52 playing cards. Represent your deck as a 2D Array where the value in the cell is the positi...
[2 replies] Last: Represent your deck as a 2D Array where the value in the cell is the ... (by dhayden)
help with prime numbers program
 
#include "stdafx.h" #include "iostream" using namespace std; int main () { int x; int i; int e; cout <<" choose a number to check if prime "; cin >> ...
[3 replies] Last: One error I thought of last night while going to sleep: this loop wil... (by PCrumley48)
by biba
C++ and AI planning
 
I have to write algorithm with c++ to optimize plan generated by satisfying planners. The main problem to me how can I build data structure to planning domain, ...
[no replies]
[HELP] User-defined header in my CPP program
 
Hi guys, I need a bit of your help again. I have found this template, named CG.h (which obviously is a header file) in my main.cpp, how am i going t...
[4 replies] Last: From what I am seeing, A, x, and b are now declared as a variable of c... (by jemeripol)
please help
 
So the process are arriving correctly, 1, 2, 3, 4....., the process are terminating 4, 3, 2, 1, 0 , -1, -2.... but I need it to stop when it gets to 1 and give ...
[1 reply] : urgent help please! so they arrive 1,2,3,4,5. How can I make them term... (by Stephanie)
Static and Singleton
 
When should i use Static member in a class and When should i use class Singleton?? Thanks.
[6 replies] Last: thank all (by nightmaregiba)
const Reference
 
Can you explain what is done when we call fuction void Foo(const int& x) //main.cpp void main() { .... int a = 6; Foo(a); ... } Thanks in adv...
[3 replies] Last: So, a wont change (by nightmaregiba)
by v01d55
Reading with function ReadFile
 
There's such code HANDLE File = CreateFile((LPWSTR)buf, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIB...
[no replies]
Suggestion to improve the do ... while loop structure (1,2)
 
We want to share this suggestion with you to improve the do ... while loop structure. Best regards, http://ncomputers.org/content/code.php?src=suggestions...
[23 replies] Last: LB : You should not be thinking about what the result of compiling C... (by ncomputersorg)
by d902
Need help with creating increment table
 
So I need help creating this program: TableA TableB 1 10 2 20 3 30 4 40 5 50 I know I need ...
[1 reply] : In pseudo code: print the headings TableA Table B for (int i=1; i<... (by dhayden)
October 2014 Pages: 1... 910111213... 38
  Archived months: [sep2014] [nov2014]

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