General C++ Programming - December 2013 (Page 25)

by dkaip
i don't understood why pos change.
 
size_t finddigit(string &str,size_t pos) { if(pos>=str.size())return -1; while(!isdigit(str.substr(pos,1) )&&pos<str.size()-1){pos++;cout<<"pos="<<p...
[5 replies] Last: Make sure you including the <algorithm> header as the example was. (by Zhuge)
How to get Program recognise user input
 
I need the program to do a calculation after the user inputs 10 numbers This is what I have tried so far Any ideas where I am going wrong: int count; floa...
[3 replies] Last: Please put code in code tags in future... int i = 0; while(i < 10... (by Mats)
SIGABRT ERROR
 
I wrote a code for a solution of a codechef problem. When I run the code in DEV C++ it runs smoothly without any error. But when I submit it I get a RUN TIME ER...
[4 replies] Last: Thanks and will surely keep in mind in my next post. But the problem ... (by Abhinav Arora)
Function By ref How it works
 
#include<iostream> using namespace std; double add(double x); double f(double u); double u; double x; double n; int main() { cout<<"Please enter a...
[1 reply] : Well this is some deep question you should probably read more about th... (by Glandy)
by dkaip
Many strings, integers, floats etc.. in one string
 
Hello. I have many strings like bellow without order, general in random... (1," bit is the minimum amount of information that we can imagine"," since it only ...
[14 replies] Last: Thanh's very much @Duoas && JLBorges. I just open my pc. Jim (by dkaip)
Program keeps crashing, segmentation fault.
 
My prof gaves us a program to run in dev c++ that deals with pointers to help us get practice for an exam. Whenever I try to run it, though, it keeps crashing a...
[2 replies] Last: I just did, sorry about that. (by Thinker67)
by Ross
GAME PROBLEM - TIC TAC TOE
 
Game doesn't exit after the user chooses to quit. Loop for the game isn't working. Board does not reset when user wishes to try another game. #include <i...
[2 replies] Last: case 2 : tralse_A = 'n'; // Set value to 'n' so while loop check ret... (by histrungalot)
read text from file
 
hey guys :) this is file where i want to read out: username=x password=blahblah level=1 ep=0 username=y password=blahblah2 level=3 ep=90 ...
[no replies]
Reversing Metrix Compiled prog
 
#include<iostream> #include<conio.h> using namespace std; //declaration of variables const int MaxRows=3;//variable for max num of arrays, will be used for ...
[no replies]
input
 
#include <fstream> #include<iostream> #include <iomanip> #include <stdlib.h> #include <conio.h> using namespace std; #define size 3 void main() ...
[4 replies] Last: for example, the input is 5,10,15, so the sum is 30. then output will ... (by Chin Pei Ying)
How to do 6input file?
 
How can I put 6 input file into my program.How can I use while to let the 6input file to open automatic?Please help me. Thank you very much.
[4 replies] Last: thank you very much (by Chin Pei Ying)
How to delete objects in an array and redraw them
 
Hi there, I am writing a program for my GBA course at uni and I am looking for a bit of help if anyone can offer it :). I am trying to built a basic space...
[no replies]
by Ross
tic tac toe problem
 
help please. the game board does not restart after the game #include <iostream> #include <windows.h> #include <cstdlib> using namespace std; char squar...
[4 replies] Last: Thanks! Fixed it. Thank you alot sir histrungalot! #include <iostre... (by Ross)
Program Showing Student Names and Marks
 
I need some help I am trying to build a c++ program which should ask the user for the size of the class and use this to allocate suitable arrays to store the n...
[no replies]
by yhu420
set Math functions in degrees
 
Hi everyone, I just learnt that built-in functions of Math.h returned every value in radians. Do you know if there is a way to set the return value in degrees?...
[no replies]
by lukkna
How to check if I'm reading file from the beginning
 
Sorry for confusing title, dont really know how to say that. So, guys, I am reading file f.e. 10 rows, then I'm stopping, doing something and reading file from ...
[1 reply] : http://en.cppreference.com/w/cpp/io/basic_istream/tellg (by JLBorges)
Vertical Histogram Question
 
Hi, I am new here and in my first year of Uni. One of my modules is C++ and I am having a little trouble doing a small task. I really need a reply ASAP so thank...
[4 replies] Last: I kinda of have to use Global variables. My professor said that's what... (by Rajiv Ahmed)
NEED HELP WITH FINAL PROJECT
 
Hey guys, I have a final project due in three days and I cant get arrays, If someone can help you out, It will be highly appreciated. I have all the details an...
[1 reply] : Hi @WALIA794, This is my approach i hope this may help you. (I can't... (by eyenrique)
Help with SetCurrentConsoleFontEx function
 
So, I'm making a program in C++ that emulates a full screen console... I used SetCurrentConsoleFontEx to set the font to 12x16 but it sucks... Anyway, I read ...
[2 replies] Last: Wow it works! Thank you really much! :D (by Dabolus)
Funcions problems in c++
 
Cant get the catch out of this program, maybe someone can lend me a hand. Write a program that computes and displays the charges for a patient's hospital sta...
[4 replies] Last: Functions don't get called spontaneously. You have to actually write ... (by MikeyBoy)
December 2013 Pages: 1... 2324252627... 37
  Archived months: [nov2013] [jan2014]

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