General C++ Programming - June 2013 (Page 22)

delete a line from a txt file
 
How can i delete a line from a file created using a C++ program?Can i get a code sample. Please help!!!!
[1 reply] : http://www.cplusplus.com/forum/beginner/26143/ (by mutexe)
While statement not terminating
 
#include "profile.h" #include "default.h" #include "Global.h" #include "c_screen.h" void profile::gen_prof() { c_screen cObj; player_cpu = 0; player...
[9 replies] Last: input from the command line will be. (by mutexe)
need help, can't see what's wrong
 
here's my program, hope somebody will see where I went wrong. #include <iostream> using namespace std; int main() { int response; int bonus = 0; ...
[2 replies] Last: Thank you very much for your help. I really appreciate it. (by neverwas10)
Assignment of objects to pointers
 
Good day, forumites. Since my c++ skills are very rusty, I managed to entangle myself in the following mess: I am using OpenCV to read and manipulate a set of ...
[6 replies] Last: Doesn't that construct MAX_IMAGES Mat objects with the default constr... (by abhishekm71)
Program that calculates student grades
 
Good evening, I have to make a program that reads two student grades, the average of the two has to be 6, if you can not take an average of 6, will make a third...
[1 reply] : Hi Maybe giving a little more explanation of the requirements of th... (by ENIGMAx)
Please Help
 
Hello all, new to C++ programing here. Hope someone can take a peak at my code here and show me what i am doing wrong. Hope you guys get a good laugh, but als...
[2 replies] Last: ENIGMAx, Thank you bud.... Awesome explanation. I really do apprecia... (by Johnnyv76)
by etneri
Calling a function
 
Hello, I am having an issue with a homework program. I've got the program for the most part except one part because it's basically wanting me to return 3 valu...
[2 replies] Last: I figured it out. Thank you very much! (by etneri)
by NDSE
Help needed with tile mapping program
 
void create_map(){ int x = 0; int y = 0; while (y >= 15) { game_map .pos_x = x * tile_size; game_map .pos_y = y * tile_size; if (x != 15) ...
[12 replies] Last: Thank you very much :D. Just rushed out a sample map for the game prot... (by NDSE)
Missing File Error
 
Hey everyone! My file will compile and run for this assignment, but for some reason it will not locate the file that needs to be appended to. I know this is ...
[2 replies] Last: I'm using VS2008 and pasting your code 'as is' failed to compile corre... (by ENIGMAx)
stringstream - read a text file to stringstreem but keep line feed /CRLF
 
Hi, I build this function in my C++ code. I run the on a UNIX box, build HTML file to use in Windows. In HTML file building code, I have only a string variabl...
[4 replies] Last: Hi Borges, Thanks for the above - new one learnt. That seems to work ... (by mathewfer)
by ostar2
std::systemerror with thread application
 
Hi I am trying to multithread an extremely simple C++ application. I am going by C++ concurrency in action. I tried the example and it compiles but it throws an...
[5 replies] Last: I am running Fedora 18 with g++ 4.7.2 and I have a 64bit amd processor... (by ostar2)
Basic Roll/Guess game with 1-100 rolls
 
Hey guys, I'm taking a C++ class over the summer I'm running into some problems. I'm implementing a simple roll game. Here's what I've done so far: 1) Asks u...
[no replies]
Using exponents/decimals with NTL library
 
Hello everyone! I am having a little trouble with some code. I am working with very big numbers so I decided to use the NTL c++ library. The equation that ...
[no replies]
parallelizing loop and uninitialized variable
 
Hello, I would like to parallelize the code. Currently it is as follows: #include "stdafx.h" #include <omp.h> static long num_steps = 100000; //double step;...
[1 reply] : Shouldn't "step" be initialized after line 11, and not before ? (by toum)
Why I cannot jump out of a for loop?
 
I got code like this: #include <iostream> #include <vector> using namespace std; const long nx(3); const long ny(3); const long seal(-1); long TotP(0)...
[9 replies] Last: You need to learn how to use the debugger. I did not see anything wro... (by kempofighter)
by Gaggy
Simple hangman game
 
Greetings to everyone! Firstly, I must apolagize for my English, I'm learning. What I have to do is the hangman game the simplest way as possible. This is th...
[2 replies] Last: Well, there's lots to work on here. First of all word and sol are... (by doug4)
Sum of digit's factorial
 
In order to answer the 34th question from Project Euler (http://projecteuler.net/problem=34), I wrote these two functions : #include <iostream> #include...
[4 replies] Last: to avoid integer division, use n/10 .0 or, if both operands are var... (by MiiNiPaa)
BubbleSort question
 
Hi there, I have an assignment to do with BubbleSort. This particular section of the assignment asks me to create a doBubbleSort method in my ArraySorter cla...
[2 replies] Last: A loop. A for loop would be recommended as you know exactly how many... (by dreyan)
Play a audio file
 
I need to make a program which can play a audio file as background while executing other operations . Please any body help me
[4 replies] Last: Try it yourself and find out... Turbo is 25 years old and most of u... (by cnoeval)
Help with a function in my Stack implementation
 
Hi, I have a class template Stack including the functions that are shown below. I want to implement the function calculate which calculates an aritmetic inte...
[no replies]
June 2013 Pages: 1... 2021222324... 28
  Archived months: [may2013] [jul2013]

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