Beginners - March 2011 (Page 47)

Initial Problem Fixed, New Question regarding program crashing.
 
EDIT: Please look down at the newer posts to see my current question. My program is crashing when I start it. The code posted here is what I'm having trouble wi...
[12 replies] Last: Would this be an issue with allocating memory? If so, how would I fix ... (by kultrva)
Error at line 76 but code ends at line 75... wtf?
 
I get this error while compiling with MS Visual C++ Express. 1>------ Build started: Project: Book Exercises,...
[1 reply] : Rethink line 55 through 62. EDIT: Oh yeah, and you're missing a clo... (by Computergeek01)
A Strange Error
 
Here is the main.cpp from my program .Everything works fine when the while loop is not there...i.e..it is done only once.. #include <iostream> #include <stri...
[8 replies] Last: that max was causing problem... It works perfectly when max() is used.... (by manasij7479)
Reading from a File into Three Arrays
 
The following is a text file that has to be converted into three arrays dc , gt , and snr the numbers for the gt array are in bold. "This data file is ar...
[3 replies] Last: Wait, I messed up on that one. It should be i%6 not i%11, sorry but it... (by hanst99)
by cdd
slot machine
 
Im trying to make a simple slot machine but i dont undersand why the output wont work. It is only sappose to output one line consisting of the the outputs. He...
[4 replies] Last: i have a simple slot machine..... || ... (by zhealz12)
Char Pointers
 
Hi all. This is probably an easy one for you guys. Why is it that when I declare a pointer variable that points to an 'int', the pointer variable stores the a...
[5 replies] Last: I wouldn't cast it to an int* or an int. I would cast it to a void*... (by Disch)
editing text space in files
 
I'm trying to take a file that has extra spaces in it, and correct it to eliminate each extra space and simply write one space between each word. The file data....
[3 replies] Last: Looks like you already figured it out, but you may want to look at the... (by ultifinitus)
Decleration and Definition of classes/functions
 
I am relatively new to C++ and came accross something puzzling in my studies. In the book it says the point of good classes are their reusability. I am confus...
[1 reply] : In the new project, you would link the object files of the old project... (by hanst99)
Filling a 2D Array.
 
I am a beginner programmer trying to understand C++ better. I am stuck with a problem, I do not understand how to load a 2D array. I have written some code, but...
[5 replies] Last: Alright, I figured it all out. Thanks for the help (by Boltftw)
flockfile and funlockfile problems
 
I want to affix password while open my file.But flockfile and funlockfile funcs is not working.They were not declared #include <iostream> #include <fstream...
[7 replies] Last: I want to say this:then get lost.I want to call u.Probably,I must said... (by Helegurbann)
#undefine
 
Has like this undef define in c++?Such as: #define inti int #undefine inti2 inti cout<<typeid(inti2).name();
[14 replies] Last: U brainy person u:) (by Helegurbann)
by GulHK
conversion to csv string
 
Hello All Could anyone please help me convert a string into a CSV string. Is it possible to put commas at specific positions? The code below puts a comma whe...
[6 replies] Last: I know the exact start and end position of each substring that is of i... (by GulHK)
MSG msg;
 
Hi,in the WinMain()its got: int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { static TCHAR szAppName = TEX...
[15 replies] Last: Ahhhhhhh, i see. We cant just give it msg because we would not be assi... (by TpOreilly)
by AlexJ
minimum number in file
 
Ok, the task at hand is one of finding the min, max, and average number in a file consisting of only numerals. I've gotten the average but, I'm having difficult...
[7 replies] Last: It doesn't, here's the entire thing maybe I made a misstep else where ... (by AlexJ)
by Kastis
Free memory
 
struct testB; struct testA { int digit; testB *C; }; testA A; struct testB { int digit2; testA *D; }; testB B; //////////////////////////...
[6 replies] Last: Thank you for your help. So I don't have worry about it. Thanks a lot. (by Kastis)
tga open GL
 
Is the .tga file format loaded natively in Open GL? Do you have to use some third party library?
[3 replies] Last: You need a library. Fortunately, I've written a very simple one. :-... (by Duthomhas)
by anzki4
Declaring int only once.
 
Just got in to a problem; how do you declare int just once, in the beginning of a program. Example: int function(int a,int b) { int something=10-b; ...
[2 replies] Last: Thank you. (by anzki4)
inheritance question
 
Hi, I have two classes, one parent and one child,child is derived from the parent. They both have a function called "disp()".In child I must use parent::disp(...
[4 replies] Last: Thanks. I have just downloaded wxDev-C++ (given on first link you p... (by oldnewbie)
solving exercises
 
Hello, I have to make program, but I’m a little (ok, totally) stuck. Program has to make two random numbers (from 1 to 9) and a random function (+, -, *, /...
[3 replies] Last: Just have it generate another random number, and based on that number,... (by packetpirate)
March 2011 Pages: 1... 4546474849... 52
  Archived months: [feb2011] [apr2011]

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