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

histograms
 
how do i create a histogram using a function and parameters. instead of a simple histogram i have to use the asci value table and the one my teacher gave us was...
[3 replies] Last: But what does it need to do? What should happen when I call: Display... (by Acr)
Antivirus issues
 
I have Avast! Antivirus installed on my computer and was writing a program with file IO and for some reason it won't let me run it. I try to run it with there ...
[9 replies] Last: Your AV could be compromised. Do you have another computer you can tes... (by ultifinitus)
Please help me with a number flasher memory game
 
whats the code for a number flash memory game in c++. i have this #include <iostream> #include "windows.h" using namespace std; int main() { int choice;...
[8 replies] Last: Charles, mine is similar to yours, only loops once though! but it comp... (by Shannon1981)
Blob Counting in c++ using recursion (1,2)
 
I have written a program to count the numbeer and size of blobs generated randomly on 2-d grid, my blob count function is not working properly and I have no clu...
[20 replies] Last: Yeah, I know what you mean. It's really frustrating when you take time... (by Duthomhas)
Convert to hex
 
Hello everybody! I have a big question about conversion from a base to a base. Yesterday a write a mini program that comunicate throw UDP with a server. When I...
[5 replies] Last: 10 FFFFFF9F FFFFFFF4 65 cpnew+=(strlen(cpnew)-2); That must be put at ... (by mircea213)
Template Class Specialization help
 
I've been trying to do this for the last 3 days and haven't made any progress. I'm making an array class into a template, and got that to work fine, but I need ...
[2 replies] Last: I can't believe those 2 were ruining everything. Thank you so much. (by AcciDante)
error c2248 in fstream
 
Hey Folks. I'm having a weird error and would greatly appreciate some help. This is the error message I'm getting: error C2248: 'std::basic_ios<_Elem,_Trai...
[no replies]
by puni
Emergency Please Help
 
I have completed my coding. But I accidentally deleted my code by mistake, what is left is my complier which (Black window screen that pops up when we execut...
[2 replies] Last: If you permanently deleted your files, there's software out there that... (by Branflakes91093)
by Null
Linked list crashes
 
Hello, I'm trying to implement a doubly linked list struct node_t { int val; struct node_t *prev,*next; }; struct node_t *list; void add(struct node_...
[5 replies] Last: add() mallocs the first node and news the others. This is really bad.... (by Null)
by manni
Dynamic memory and arrays! help
 
Hi I'm tryig to perform some matrix calculations with ++, but i want to define the matrix and it's dimensions as an array within the program using dynamic memo...
[1 reply] : You have defined Matrix = new (nothrow) int ; but you don't assign a... (by Moooce)
Function Template
 
Hello. I have to write a template for compareTwoArrays function. The function gets 2 same-sized arrays of type T and returns: -1 if second array contains min/...
[1 reply] : I'm not sure if I quite understand what you're trying to do, but if yo... (by anonymous23323124)
plz help
 
ALright so basically your suppose to tell the program the length and width of room and cost per sq foot. And the program should calculate the total including la...
[6 replies] Last: You see the way you did int count; cout << " Enter number of mesureme... (by haselden05)
by jdkunk
std::stringstream fails to read what it just wrote!
 
Why does this not work when it's C counterpart does work? I would much rather use the >> and << operators, but read and write are not working as they should, an...
[2 replies] Last: What happens if you do stringstream ss; instead of stringstream ss... (by guestgulkan)
Start Programm with Parameters and mpi
 
Hello everybody, I'd like to start a c++ programm with some parameters, like n, i_proc, j_proc. It is a parallel programm and I need this parameters for dec...
[2 replies] Last: Thank you very much for your help. The part with argc and argv I hea... (by stubborn)
help string to char
 
Hi guys, I have written code like int return_value(char* word){ . . . return some_value; } int main(){ string word; . cout << return_valu...
[2 replies] Last: @ bshrestha : Tapai nepali ho? :) The problem lies in the way you hav... (by lnk2019)
Data stream in the file
 
Oh you help me do this exercise • Introduce the problem There is a set of sentences in English or Vietnamese are unsigned keyboard input. Write normal...
[no replies]
How to read text file (.txt) into vector of char using STL
 
I have file text.txt and want to change upper case letters to lower case letters. I'm not sure how to read from the file and use STL list<char> to store lette...
[8 replies] Last: Thanks you guys. Finally, I can do it. :D (by redriller)
operator = conversion problem
 
I keep getting the error message: Error 1 error C2679: binary '=' : no operator found which takes a right-hand operand of type 'Program *' (or there is no accep...
[1 reply] : Post some more code. Try finding the least amount of code that reprodu... (by hamsterman)
Letter reverser
 
Ok, so I have to create a program that will take in a string, then reverse each individual letter. So "Hello there john" would be output as "olleH ereht nhoj". ...
[4 replies] Last: I have not been able to do what you want using C++ strings. This is wh... (by buffbill)
segmentation fault with fstream
 
I'm trying to read data in from a txt file using fstream. It works fine (complies and runs with the expected restul) if the code is in one cpp file. Unfortunat...
[3 replies] Last: double data ; that's not right. I don't know what the standard says ... (by hamsterman)
April 2011 Pages: 1... 1213141516... 37
  Archived months: [mar2011] [may2011]

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