General C++ Programming - May 2012 (Page 12)

by MAQAH
pass by reference
 
Some one please tell me the real difference between pass by value and pass by reference. I mean , the problem is why some programmes wont work if it is not pas...
[4 replies] Last: damn it , got it , .. I cant beleive y I was so blind not to understan... (by MAQAH)
Reading all but the last few lines of a data file
 
I can easily skip the header of a data file using getline, but then when I parse through the data file and get to the footer of the file, I end up stuck in a lo...
[1 reply] : If the file format is well defined then you should look at the specifi... (by Texan40)
A homework I cant complete
 
I am a beginner in C++. There was a homework that makes a big trouble. Please help me. Write a function to compare two C-strings for equality. The function s...
[4 replies] Last: If the OP wants to compare C-strings, it would seem like using pointer... (by krakissi)
Code Editor (iPad2)
 
Hi Everyone, I am interested in finding a coding editor that I can use on the iPad (iPad2 if it matters), and I'm looking to for suggestions/feedback/etc. I ...
[2 replies] Last: Check this out: http://itunes.apple.com/us/app/textastic-code-editor/i... (by closed account zb0S216C)
dll and template?!?!
 
Hi, I want to know how i can create a template library without explicit the code above??... i know all the problem that a template class or a template function ...
[2 replies] Last: If you have a list of types which the template will be instantiated fo... (by kev82)
Is main function in c++ user defined or built in?
 
I need expert advice on this one, you know some say that main is user defined as we define the body (that is my opinion too) but others say that is predefined/b...
[1 reply] : It is user defined, there is no 'default' version provided by the tool... (by closed account 1vRz3TCk)
undefined reference to 'initialArray(int *)
 
#include <iostream> #include <fstream> #include <string> #include <cstdlib> #include <iomanip> using namespace std; void initialArray( int * ); void c...
[2 replies] Last: Thanks. I was up until 3 am and thought I respelled it like 20 time to... (by garyfri)
by bmwboi
Binary file help!
 
So I'm trying to create a program that writes to a binary file, then displays the information. However, I'm getting a problem... whenever I try to print out the...
[3 replies] Last: anirudh sn, thank you very much sir! Repositioning the file pointer to... (by bmwboi)
Segmentation fault message in dev C++
 
Hi, when i run this program, the program hangs when i enter input value as CTRL +Z. Also i am getting a segmentation fault when i debug this program. also pl...
[13 replies] Last: I got the VS IDE working , thanx a lot for ur advise cire. (by v1ashiva)
parsing filename
 
Hello, im trying to parse the file name using strtok(), can anyone tell me how to use '\\' or '//' as delimiters with strtok?
[2 replies] Last: thank you!! (by SirSmilesaLot)
Displays Question Twice
 
So I am writing a program that can calculate the sin law for me, and i have written quite a few programs using the goto Redo; command, but I have never had i...
[1 reply] : You use getline and cin >> together which causes the problem. You cou... (by vin)
how do i count characters after i get words from text
 
i found out how to get each individual word from a text file. Now i am trying to limit each line to a certain number of characters. If the line limit is 10 and ...
[no replies]
Problem writing C code for this problem
 
You are working for a software firm that is to develop a word processor. In order to create an efficient spell checker, you want to know the frequency of occure...
[2 replies] Last: i dont see a problem unless its a dynamic string. (by SirSmilesaLot)
Indexing Duplicate Variables In An Array
 
hello all i have been writing a mud all year and when monsters are in the room it displays like so: There is a dragon, a dragon, and a minotaur here. i ...
[no replies]
by Argon
Practicing menu... help!
 
Hello, I'm fairly new to C++. I need help with a bit of code for the beginning of a menu program: I can get it to list the menu, but I am having trouble with t...
[2 replies] Last: I am an imbecile, sometimes. I put it in just after the menu choices. ... (by Argon)
random number generator
 
Hello, i need documentation or/and implementations on how to create a number generator ? Any help will be appreciated, Thanks !
[8 replies] Last: Also remember to seed random number generator. Use for example ctime l... (by eraggo)
Codeblocks Global variables setup for GTK+
 
whenever I try to compile GTK+ programs, it comes up with an error: gdk-pixbuf.h no such file or directory and 81 other problems that stem from that. I have win...
[3 replies] Last: no, apparently I have no gdk-pixbuf/gdk-pixbuf.h, but i do have gdk-pi... (by jsprogrammer)
Code works on Linux but not on Windows OS
 
Hi, I have been wondering why the code below is giving me different output on Windows OS. Meanwhile, the same code works well on Ubuntu. #include <iostre...
[3 replies] Last: Good on you. In declaration, char getgender(string, char&); Then, ... (by b2ee)
A function pointer to a member function that is a member of a class
 
Hello, How can I create a function pointer that is in a class that points to another member of that same class (so I can switch out "strategies" without chec...
[6 replies] Last: That worked! I misplaced my parenthesis. Thanks for the help! (by lolz123)
by bmwboi
Need help writing to binary file
 
Well, as the title says, I need help writing to the binary file. The program compiles just fine, but when I try writing to the file, it doesn't work. It does pr...
[6 replies] Last: It's still printing out jibberish, but when I go into the file itself,... (by bmwboi)
May 2012 Pages: 1... 1011121314... 41
  Archived months: [apr2012] [jun2012]

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