General C++ Programming - November 2016

Problem with writing into file (fstream)
 
Hi! I have a FOR LOOP for writing an index file. My index file depend the word that i receive in ...
[no replies]
helpp ASAP function and array
 
i need to write a function that uses a file to fill up an 2 arrays string and double that is in main...
[2 replies] Last: i do kinda know how to use arrays, im looking at tutorial right now. ... (by waqarmalek)
Error allocating memory
 
Hey, first of all, i am writing my Code in C not, C++. I hope you could help me though. As the titl...
[3 replies] Last: Do you call it before trying to access pressureentries? (by Peter87)
Please Help!! Arrays
 
Can anyone explain how to write this program? A group of 50 people have gone apple picking at...
[1 reply] : help with what ? (by SamuelAdams)
by ddz
Problem with "if" in the code
 
Hello Guys, I am new to programming so I don't know what is wrong in if / else if statements. No...
[3 replies] Last: Thanks @Chervil. I am new so I didn't knew about that. Now I figured I... (by ddz)
My code for line[34] how to make it grab the data
 
I'm grabbing data from an html file and I need only the 34th character or above to 4 spaces only on ...
[1 reply] : How to use code tags http://www.cplusplus.com/articles/jEywvCM9/ (by SamuelAdams)
Friend and const doubts
 
#include <iostream> using namespace std; class Comp{ private: float r, i; public: Comp()...
[3 replies] Last: Thank you both, gunnerfunner und cire. I manage to make it the way i w... (by drporto)
by domcho
Problem with istream_iterator
 
I am trying to read an object from a file. It's a student who has a name, number of grades and grade...
[2 replies] Last: Works perfectly! Thank you very much! (by domcho)
Standard input/output help C language
 
Assume that word is an array of chars containing a string . Write a statement to display the mes...
[1 reply] : Try this: printf("Today's Word-Of-The-Day is: %s" , word); ... (by Thomas1965)
my poor lottery checker program
 
#include<iostream> #include<string> #include<cstdlib> #include<time.h> using namespace std; //fun...
[1 reply] : This is only a warning and isn't a problem. You have a problem with ... (by coder777)
My menu isn't very intuitive.
 
My menu isnt very intuitive. How can I make it a case-switch menu instead? Also, I would like for th...
[1 reply] : Please, use code tags for readability. [ . code . ] Code here... [ ... (by boost lexical cast)
Solved it, got the data i needed for line[34].simple code
 
using namespace std; int main () { ifstream infile; infile.open("page.out"); string l...
[no replies]
Help trying to get Player to interact with Monster
 
Hey everyone, I've been trying to create my roguelike type of game for C++ using the ncurses library...
[no replies]
Why wont a substring method work in a while loop
 
I was using getline(infile,line) for an out file that I had, and I tried to use line.substr(5,5); al...
[2 replies] Last: Good ideal, maybe some of the lines only had a few characters but some... (by Jonjonscove)
Why does the get line method take more than one line sometimes
 
I'm using the get line method for an infile file. Getmethod(infile,line). When I print the results ...
[no replies]
input Max and Min in array
 
I can't seem to figure out a way to implement a max and minimum to an array. where it will only outp...
[7 replies] Last: // Project8.cpp : Defines the entry point for the console application.... (by Kevin10official)
by J4999
Counting occurences of value in an array, and duplicates
 
Hello. I have to find the occurences of every element in an array, but I don't know how to get rid...
[2 replies] Last: a dynamic two-column table ...better known as "map"? std::map<int, ... (by Cubbi)
Reading in a binary relation
 
I'm trying to read in a binary relation from a user that comes in the format of {(1,2),(1,4),(2,3),(...
[no replies]
Passing function as argument to an other function
 
What is the right and most up-to-date way of passing a class member function to an other function as...
[3 replies] Last: Sure... bind() itself provides partial application. Without gettin... (by mbozzi)
Card game
 
Hello, I need some assistance with my program. I have not started it. I am a little confuse Input...
[1 reply] : Hello, I'm sorry if I'm wrong of your intentions, but may I remind you... (by pigeonfizz)
November 2016 Pages: 123... 23
  Archived months: [oct2016] [dec2016]

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