General C++ Programming - April 2009 (Page 14)

Questions on building a fixed data table...more in content.
 
So what I'm trying to do is compare a string to a large amount of strings contained in a table. For example say I have the word "Today". And lets say I asso...
[2 replies] Last: Ok, say I don't want to write data to a file but just build my contain... (by bluevision)
What am I doing wrong?
 
I am having trouble with the if statment. I need to make 1 to 100 available for two numbers to be entered and the largest number shown as. I also don't know w...
[1 reply] : You didn't take input for the numbers, and you're using the same compa... (by Gumbercules)
what can be the Preproccesed code. of this syntax
 
Hey Guys...... i want to know what can be the preprocessed code of this synatax... #define DEBUG(x) cout<< #x"="<<x<<endl It would be nice if any one ca...
[2 replies] Last: Thanks for it ...it works.. (by ajay16oct)
trouble with my code
 
i have been trying to code a two dimensional array so that it will read from a text file and display the data i am able to get it to read from the text file alt...
[4 replies] Last: i replied to your previous post.. look at that.. :) (by writetonsharma)
Should I Use Multi-threading to Solve This Coding Problem - Client/Server in C++
 
I'm trying to write remote file manager access in C++ under Windows. It is a client-server based on command line interface. Right now, i did not do anything rel...
[2 replies] Last: GREAT .... I will re-look at the code. It will help me surely... Thank... (by f ben isaac)
STL map
 
I have written a multi threaded code. Where I am reading values into a map and then reading it just after that. Its running absolutely fine but in some case...
[7 replies] Last: Yes, you will need to use mutexes or locks in order to prevent multipl... (by firedraco)
Inserting Objects containing three numbers into a std::map
 
Hello! I tried to implement a map, which uses an object of a certain class as key. This class contains three numbers (phi, theta, norm). I've implemented the...
[14 replies] Last: Thank you very much. Of course you are right. One has to introduce a h... (by lostprophet)
by phyck
Two-dimensional char array trouble
 
Hi, I'm having some trouble making a two-dimensional array of char's, I'm going to use this array as a play board for a game. This is my source: Board.h: ...
[4 replies] Last: Thanks for the help, I guess I have to learn more about using pointers... (by phyck)
by smiler
istringstream question
 
Hello, I have a question :) istringstream line("Hello "); string s; while(line.good()) { line >> s; cout << "s is " << s << endl; } Why does it...
[7 replies] Last: Thank you! That helped me. I check fail() after >> operator ;) (by smiler)
Decoding Problem
 
I have a problem with my decoding program that I'm trying to figure out. It's supposed to read in a encrypted line of code from a .txt file and then by using AS...
[14 replies] Last: hahahahaha... ok... (by writetonsharma)
by R2M
Pointers again!!!
 
Hi all, I have a small doubt . I have written a code to check how allocation in memory is done. Now when i am deleting the pointer , it is crasing. Below is my...
[9 replies] Last: Now when i am deleting the pointer , it is crasing. what does crashi... (by kaidranzer)
by MTampa
Creating a program to find value in rectangle
 
I am working on an assignment where I have to create a program for users to input coordinates for a rectangle. This program is intended to be a struct withi...
[1 reply] : the program is very much complete.. just create a main like this: ... (by writetonsharma)
Vector Problem
 
I am given a file named intercepted.txt that has the following inside it on one line: :mmZ\dxZmx]Zpgy I am supposed to read in this encrypted line of code...
[7 replies] Last: its quite easy.. you are not ready to try it out.. its a string of ... (by writetonsharma)
Immediate Input
 
Hey. Okay, so I'm working on a calculator program, and in order for it to work like I want it to, I need it to get input immediately, before the user presses e...
[1 reply] : I don't think it can be don with iostream, but I'd love to know if I'm... (by Gumbercules)
by Brad T
"Unlimited Instances"
 
How can you have an "unlimited" number of classes (eg. they are allocated as they are needed) rather than allocating like 100 instances when your program starts...
[10 replies] Last: It's usually best to use a vector of pointers. It can significantly re... (by helios)
by jaslks
File reading
 
Hi, I have a problem reading my text file. I have a text file looking like: 113 213 322 and i want to read it into a vectors and get a result like: ma...
[3 replies] Last: is map is of type std::map. Can we do a push_back on map's. (by writetonsharma)
change from c to c++
 
I ran across one of my old .c files and I am trying to figure out what the equivilant would be for c++. I used the following: Under the .c I used sca...
[3 replies] Last: Hi, The C programming coding little bit different from C++ and easy w... (by jumper)
search/edit existing ascii-file
 
I have an ascii-file containing several lines of information. the file looks something like this: 2345 an integer line with text 9835 another integer a...
[2 replies] Last: im gonna change the format of the file im reading from, your post help... (by mariusess)
Linked List Problem
 
Ok so I know how to do this with pointer to pointer.. AddNode(Node **ppNode) and what not but I cant figure out for the life of me how to get it working with j...
[4 replies] Last: Awesome thanks, that clears up a lot :) Thanks, Myth. (by Mythios)
function v/s subroutine
 
i found a statement in wikianswers that says "A function returns a value whereas a subroutine does not. A function should not change the values of actual arg...
[12 replies] Last: Subroutine also describes a callable section of code with no notion of... (by kbw)
April 2009 Pages: 1... 1213141516... 20
  Archived months: [mar2009] [may2009]

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