General C++ Programming - May 2011 (Page 28)

simple question about ifstream
 
I have a text file containing numbers. the first two numbers are the x and y size of the map im trying to create (for a game), and the rest are the IDs of the t...
[2 replies] Last: i got it working fine now thank you very much these forums are great (by GetBaldy)
What if the operator [++] or [--] is used twice or more within a while-loop?
 
Hello fellows, I am curious to know the real effect on my variable Lower in this loop: while(Lower > 0 && ITGW[ --Lower ] < dMaxIT ...
[2 replies] Last: Simply put, using a variable that's being incremented or decremented m... (by helios)
reading from a file
 
ok lets say i have the following text T 2 X F X 2 Y G Y 1 Z Z 2 G 1 I 3 T G E F 2 I E looking at the first line t is the vertex 2 is the number of ed...
[5 replies] Last: if the output looks like the input then code should be similar. First... (by coder777)
Too many EOFs
 
Hello, I am having a hell of a time understanding why the following code returns multiple EOF indicators: #include <stdio.h> int main() { FILE *f; ...
[2 replies] Last: Open the file as binary. f = fopen("data.txt", "rb"); (by kbw)
C++ string help_for loop issues
 
I am trying to implement the gauss seidel algorithim in C++. I will provide a working example so you can understand what im trying to do and how i need to set u...
[1 reply] : The process is rather simple, but it hurts me so much your variable na... (by webJose)
what am I suppose to do?
 
I am confused about what to do in the main function as well as the update_board function. Any help would greatly be appreciated. #include <iostream>...
[1 reply] : the function display board should look like this for(int nRow = 0; ... (by Azagaros)
countdown...BLAST OFF!!!
 
-------------------------------------------------------------- 4. Write the C++ statements that will print the following: .9--------- ..8-------- ...
[1 reply] : you need the other loops in it to make it work. Remember you said nes... (by Azagaros)
Unwanted repeated set of random numbers
 
Hello. I am programming a Yacht game. I am using an array of five elements that will symbolize the five dice, which are, of course, randomized. It does show ...
[2 replies] Last: Yeah, I got it to work. I just needed to change the seed, like you sai... (by barb 1989)
Getting only 1 long error
 
Hey all. I am trying to start my c++ final and am running into a bit of trouble already. I have tried to get just the cout statement for each case to display b...
[4 replies] Last: moving the cin line (line75) to line 46 did not change anything. howe... (by nathan1987)
Help on random program.
 
I've been given a data file that lists Presidents Names, Last name First, Then First Name. The object is to create a chart that looks like 0 2 Adams,john 2...
[5 replies] Last: first thing I see is a confusion of loops now. int nCount = 0; fin.... (by Azagaros)
question about vectors
 
So I have one class called Object(){} and a ton of child classes that inherit from it. my question has to do with managing all of them. I want to put all obj...
[2 replies] Last: thank you very much! (by GetBaldy)
Text Files
 
Hello, I am writing a code for fun, and want to further my knowledge in this area, but am getting stuck. I want to ave files to text files, and then load parts...
[5 replies] Last: why does your code open the same file twice? What are we trying to do... (by Azagaros)
Sorting file using delimiters
 
I was wanting to know how you would sort a file based on this style. name1 line of info line of info name2 line of info line of info etc.. I wou...
[4 replies] Last: Thanks for all of the help. This was all very useful to me. I was look... (by jan3239)
c/c++ socket send commands in string
 
Hello, i am new in the socket programming in C/C++. I wrote Client and Server Socket. They can send and receive string. The idea is to send the commands to the ...
[2 replies] Last: thank you for your answer. it is really helpfull :-) (by cheloveg)
Converting to binary errors
 
Hi, I'm new to programming and I need to write a program that will convert decimals to binary and the other way around, I've decided to start with converting de...
[6 replies] Last: You're awesome, thanks :) (by stridexr)
by MOM
Total memory taken by list & vector container
 
Hi I'm using the list and vector containers, and need an exact account of the total memory used by my program. I know that these containers use extra linkage p...
[17 replies] Last: Thanks. (by savavampir)
Casting syntaks with pointers
 
Is this same thing: 1. T*(someVoidPtr) 2. (T*)someVoidPtr
[12 replies] Last: Thanks all of you. (by savavampir)
passing copies
 
So there's got to be a good standard way of doing this, but I'm not seeing it and I'm wondering how others would handle this. lets say for example I have a S...
[5 replies] Last: It is the same for constructors, except that you will have to use a po... (by webJose)
Counting Characters
 
So I have an assignment and the purpose of it is to "Count the alphabetic characters in an input stream, display the totals." And I've worked really hard to ...
[8 replies] Last: The code works as expected if it can find the file correctly. I didn'... (by Azagaros)
Image Processing
 
Does anyone know how I could detect an object within an image? What I have to do is, isolate that object and the get measurements from it. So, all the backgroun...
[2 replies] Last: Thanks, I'm starting to read the book on openCV right now. (by noobster)
May 2011 Pages: 1... 2627282930... 32
  Archived months: [apr2011] [jun2011]

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