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

problem in allocatin memory in linux
 
server::server(){ port = 0; serverup = 0; loaded = 0; logfile = (char *) malloc(SERVER_PATHS_SIZE*sizeof(char)); //***************************...
[1 reply] : Let's take sprintf(name, "%s\x00", in_name); How is load called? How... (by kbw)
by marko1
iostream problem
 
Hello, I have a (understanding?) problem with the behaviour of the std::iostream class. Specifically with the insertion operator. I have the following code:...
[2 replies] Last: I found the solution by myself. The problem is I wrote to the stream u... (by marko1)
need help in string
 
i want to do that read the following multiple file from argv like that: ARGV: C:/>x 4 ../dat doc1.txt doc2.txt doc3.txt but that not fixed with the ...
[1 reply] : string path=argv ; for(int i=3; i<argc;i++) { string file_name_pa... (by kbw)
Best book to learn advanced Templates and STL
 
Hi All, can any one let me know which would be the best book to study advance templates and STL?
[1 reply] : Two very good books : Advance Templates: C++ Templates: T... (by closed account z05DSL3A)
Reading Frequencies from Wave File
 
I am looking for a way to read a wave file into memory and then determine the frequency ( or frequencies ) of the sound in the file. The wave file would only c...
[6 replies] Last: This guy wrote a library, You don't have to use it if you don't want... (by Zeillinger)
Checking if value is float or int
 
I want to create a program that will find the factors of a given number. I have thought up of this concept: The User will enter a value (say x ). The progra...
[16 replies] Last: Duoas, you're right. I've missed that... (by Zeillinger)
simple C++ program help required !
 
i am trying to write a code for a program ,which is able to give the ASCII code for special keys on keyboard...provided that the key would be entered by the use...
[1 reply] : In a loop, read character by getch(), and print that character by typ... (by techie07)
Quick Question
 
Hi, I'm trying to add a char to an array but I'm getting some errors. The client part was written by my instructor so I'm not supposed to make changes to it but...
[9 replies] Last: ...That's hard to believe. Without the parentheses, you should no long... (by Zhuge)
by Blingo
Nightmare Debug Problem
 
I’m having great difficulty tracking down an issue causing a crash on our overnight build and test suite. I’ve been trying to resolve for a couple of days n...
[7 replies] Last: Can't be any of these two things. I ran the remote debugger several ti... (by Blingo)
fstream
 
I want to open a file which names is not in ASCII character set. like fstream fileH; fileH.open("δ»Wüste.txt"); Is there way exist in through which I ...
[3 replies] Last: Try and see what happens mate (by Acr)
by zr870
Simple Encryption Program
 
I am trying to make a program that encrypts a text file. It will go through the file and turn a into b, b into c, and so on. I am having trouble though. this it...
[1 reply] : A few problems to begin with: (1) When opening a file, I believe you m... (by Zeillinger)
by leo818
String
 
I am having trouble creating a inverse string and a jumble string. If someone can help I'd really appreciate it.
[1 reply] : Go to the reference area of this site and find the section on STL Algo... (by PanGalactic)
Va list replacement values
 
I haven't really found a definitive list of all of the Va_list replacement values (by which I mean "%d" and "%s" or whatever) and I would like to know what argu...
[2 replies] Last: I was looking in the wrong place, thanks. (by AGlass0fMilk)
Overloading extraction operator for private two dimensional variable in three dimensional template
 
I have been having a lot of trouble overriding the extraction operator for my matrices class. The Matrix class is template<class T,unsigned int ROWS, unsig...
[10 replies] Last: THAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANK YOUUUUUUUUUUUUU... (by helasraizam)
Problem Passing struct to function
 
Hello, we just learned about structures in my programming class and I am having a hard time editing my existing program using them. Please Help Input file: ...
[3 replies] Last: If you want to do any non-school programming you should probably use D... (by KrahkaMaster)
Template class LinkedList Problem
 
I'm Getting this error when i compile my Program. Error 2 error LNK2019: unresolved external symbol "public: void __thiscall SinglyLL<int>::remove(void)" (?rem...
[7 replies] Last: Thanks To all of u Guys... (by mdanyjam)
File block
 
OK so i have to make this program that stores some values in blocks of 512 bytes and i have a struct (example): struct one{ unsigned short x; unsigned short ...
[6 replies] Last: thanks for the help kbw! ^ ^ (by CrimsonAngel)
STL and <algorithm> <numeric> libs
 
1) Write a template function EraseAll which receives a vector<EltType> vec and an EltType elt postcondition: all elements in vec whic...
[1 reply] : 1. http://en.wikipedia.org/wiki/Erase-remove_idiom 2. Isn't the avera... (by kbw)
Using Classes
 
I am having trouble constructing one of my header files in my program. I'll provide the rest of the code so you can see what I am ultimately trying to do. I'l...
[1 reply] : You have to have functions for the class. (by Krakarn)
Question about 'delete'
 
Ok, i was imagining how would i make dynamically allocated objects in my program allocate and delete correctly without the programmer having to use new and dele...
[1 reply] : delete and delete operators must know the type of the object. What yo... (by Bazzy)
April 2011 Pages: 1... 1011121314... 37
  Archived months: [mar2011] [may2011]

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