General C++ Programming - December 2011 (Page 29)

editing text files
 
i have a premade textfile and i want to be able to change certain lines of it. i cant find any info on writing to certain lines of a txt file, can someone help?
[4 replies] Last: No, you need to write the strings back to the text file to save the ch... (by Stupebrett)
Converting exponents to regular numbers
 
I have a code that outputs the first two numbers in exponent form (1.2e+07 for example). I would need it to output 12000000 instead. Can someone tell me how thi...
[3 replies] Last: That's what it shows, just with a . and some decimals. I don't think y... (by hamsterman)
Grading on a Curve Program, wrong output when two values are 0.
 
Here is the problem: PROBLEM: Letter grades are sometimes assigned to numeric scores by using the grading scheme commonly known as grading on the curve. In th...
[1 reply] : When iterating over an array index must be always < sizeof array. So ... (by coder777)
by myx360
problem with static variable passing to objects
 
Hi, I've got a static variable within a .h file and it seems to be initialised fine, but when i try to adjust it its coming out with a -1.#IND runtime error. ...
[1 reply] : static const double kT=0.00023481; You can't initialize static c... (by shacktar)
C++ compiler
 
Can anyone give me some download links for free c++ compilers,please? i found one but i have to pay it after a couple of days....
[8 replies] Last: Blodsed dev c++ is the best for beginners. Bloodshed Dev C++ is no... (by Moschops)
Boost Threadpool has memory leaks
 
Hello everyone, I have Boost 1.42 and Threadpool 0.25 installed. When I use _CrtDumpMemoryLeaks(); at the end of my program, I get a lot of memory leaks, eve...
[2 replies] Last: Thank you for the quick response, Cubbi. That helps a lot. There was ... (by Squall83)
by Ahmed1
problem while reading a CSV file
 
Hello there, submissiontime length finishtime remainingtime 1031 17:11 574.1025391 MB 1050 17:30 1 1326 ...
[3 replies] Last: Thank you very much both of you. The code is working fine now (by Ahmed1)
Putting output of the bitset member funtion count into a vector is slow
 
Here is a part of my C++ code where I have problems: std::bitset<64>a; std::bitset<64>b; std::bitset<64>c; int bit_count=0; std::vector<int> vec(SIZE,0);...
[3 replies] Last: Sorry just to reply now. Thank you very much for your help. It is tru... (by michel84)
Postfix Evaluation
 
Hi, I'm supposed to write a program for school that performs postfix evaluation. It's going pretty good except I've run into a small problem. When I try to pr...
[10 replies] Last: Hm, I see that inherent logic is not so easy to get. I tweaked it so t... (by coder777)
implementing constructor....Need help
 
#include < iostream > #include < fstream > #include < cstring > using namespace std; // This is class specification for MyString class MyString { p...
[3 replies] Last: Thank you very much for the assistance I believe I understand but if i... (by harrisdd)
by MR YAJ
File Handling with structures Help!
 
I have a problem. we were asked to do this and i simply have no idea how to start with it. can anyone help me. design a develop application that uses STRUC...
[1 reply] : Why not using a standard database? (by aviplot)
Prime number
 
how can i get the largest prime number ? any help please
[4 replies] Last: for(int i=0; i < max_primes; ++i) if(primes > largest_prime) ... (by Stupebrett)
c-strings
 
I'm supposed to modify an existing payroll program from using normal c++ strings to using c-strings... and I don't get them. Can someone explain them to m...
[5 replies] Last: Just put arguments with default values 'last'. In your case, switch fi... (by modoran)
So many errors!!!:(
 
trying to teach myself and just cant get rid of these errors. any help would be greatly apprecaited. main.cpp #include <cstdlib> #include <iostream> #inclu...
[13 replies] Last: I believe this is suppose to be in it. Just have no idea where to but ... (by AKAMacC)
Quicksort troubles
 
I need to make a quicksort program that tells me how many swaps quicksortt goes through from an array that holds 10000 elements with a random number generator. ...
[1 reply] : while (ipA < iPivot) { ++iLower; ... (by ne555)
Question about vectors
 
I am working on an asteroids program for class and I have it mostly done. The only thing that I'm having problems with is using a vector to assign an id to the ...
[3 replies] Last: @pot I see what your getting at. So that would create a total of 10 a... (by Paul Christopher)
Segfault in msvcrt
 
I am getting a strange runtime exception and gdb in pointing to an empty line in my code. The weirdest part, is if I set a breakpoint to the line it's crashing ...
[3 replies] Last: I haven't used this in a while, but some links: http://msdn.microsoft.... (by kbw)
by BONUS
NEED help here please! I am not expert on C language
 
I am doing a project with a PIC micro controller by using its ADC to measure the peak-to-peak voltage and the frequency of an analog signal between 0v and 5v, a...
[1 reply] : Here is my complete code: / testDlg.cpp : implementation file // #inc... (by BONUS)
C++ Library for Making Games
 
Hello, I was wondering what C++ library is the best for making games. I would like it to be easy to learn, have good graphics, be free, and have good sound qua...
[1 reply] : I've looked into this and i would strongly suggest sticking with 2D li... (by LovestoCpp)
Sumo robot for class.
 
Hi everyone. Im a student from one of the uk universities, and im currently enrolled in Mechatronics Engineering. One of my module deals with programming of the...
[1 reply] : #include "timerInterrupts.c" // timer interrupts function included #i... (by LB)
December 2011 Pages: 1... 2728293031... 39
  Archived months: [nov2011] [jan2012]

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