Beginners - August 2010 (Page 27)

by fafner
Dynamic memory for n00bs
 
I'm trying to ge tto grips with dynamic memory allocation, and I'm a bit confused. What is the difference between this: int c; std::cin >> c; int b ; ...
[9 replies] Last: Ah, I see! Excellent, thanks everybody;) (by fafner)
Removing elements from array/list
 
Hello everybody. I'm trying to figure out how it's possible to remove an element (by its value) from an array. I came across <list> and this is my current code:...
[1 reply] : 1) Did you mean card on line 29? 2) std::list doesn't have an operato... (by firedraco)
C++ & HTTP
 
Hello ! i'm new in c++ programming and i have to write a c++ application that will receive data from HTML form. So i need a library to do that. I've tried ...
[no replies]
dynamically create graphviz graph
 
Can anyone point me to a tutorial or something that describes how to dynamically create a graphviz graph using BGL from a text file? I can't find anything! ...
[no replies]
Pulling random cards from deck
 
The problem I am facing is that i have a sorted deck made and I am pulling cards out of it at random. As I pull cards i then store them and mark the card pulled...
[6 replies] Last: firedraco +1 (by Duthomhas)
wrong input
 
hello, i have a simple Q , for example if i ask a user to input an integer value, but instead of this he/she input a charecter value i want to show that h...
[3 replies] Last: There is also this: http://www.cplusplus.com/forum/beginner/13044/pag... (by Duthomhas)
GetDIBits returning senseless rgb values
 
Ok, im trying with GetDIBits but i cant make it work. It always returns senseless values. I think im missing the purpose of HDC here. Can someone explain this...
[4 replies] Last: Thanks again, it works as a charm. Marking this topic as solved. (by temporaryavailable)
What does int actually represent?
 
I'm not exactly a beginner when it comes to C. I've spent more than two years working with it. But I am unsure as to what int actually refers to. I've always...
[4 replies] Last: Ah, that's great, thanks. I guess size_t would be a good (if odd) dat... (by nexekho)
by takure
difference between "0.0" and "0"?
 
for example, int p = 0; float q = 0.0; <------ why not 0, instead of 0.0? what difference does it make?
[1 reply] : 0 is an integer literal whereas 0.0 is a double precision literal. Its... (by Galik)
by DKB
begin program with keystroke
 
Hey, so I have made a program that I want to begin by simply hitting a specified key. I guess I could do this by using cin, but this is my first attempt at a ...
[1 reply] : You have to have a system hook to see key presses when your program do... (by Duthomhas)
fatal error link
 
stuck on what i'm doing wrong // Curtis_Lorance.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> ...
[2 replies] Last: wow idk how i didn't see that... lol thanks that was it :) (by celecon)
How to initialize a base class constructor?
 
Hello, I am working my way through Object Oriented programming in C++ from Robert Lafore and I am stuck with one exercise where he calls a base class constru...
[6 replies] Last: @Galik: you are absolutely right about the responsibility of the base ... (by pagefan)
by Wander
List
 
I have searched on this website and all over google, but I can't find any pages that actually tell you HOW to use the lists. Can someone please show me the basi...
[4 replies] Last: lol! I didn't realize that. Thanks :) Stupid me. (by Wander)
warning when printing to file
 
Hi guys. In my code, I need to print to a file from time to time. I use the following lines: FILE * outFile; outFile = fopen(fileName,"w"); tempLine <...
[2 replies] Last: Thanks, I'll try this out tomorrow). I think I got what you mean. ... (by yotama9)
an interview question
 
What's the output of the following program? Assume the program is running on a 32bit CPU. #include <stdio.h> int main() { int i=3; int j; j=sizeof(...
[14 replies] Last: So you need to know how many bytes an int is on a 32 bit computer (I'... (by mcleano)
not1 function Adapter problem
 
The following program works on g++ 4.4 when IsOdd is a struct and does not compile when IsOdd is a class. The error message (partial) is /usr/include/c++/4.4/...
[2 replies] Last: Bazzy! Thank you. It should have been obvious to me. (by arthurm10)
fstream tags
 
I've just been learning about basic file operation in my Intro to C++ textbook. The book states that "dataFile.open("file.txt", ios::in | ios::out)" should allo...
[1 reply] : I can't check it now, but I think you should change: dataFile.open... (by mtweeman)
by TheDon
vector<struct >
 
Heyy! I create a struc : typedef struct pay { string name; vector<string> v; ...
[2 replies] Last: So we can do : t .v.push_back ... (by TheDon)
scientific notation?
 
can someone please help me understand why totaldivsales, average, and at the bottom, total yearly corporate sales, show up in scientific notation instead of val...
[6 replies] Last: On line 83 array index is out of bounds (array indexes start at 0) so ... (by Null)
by MWH
Problem with Templates
 
I have created stack class with templates in order to use it with many types. I created the main program to search a character. But compilation gives me errors ...
[2 replies] Last: Thank you for the help. That was the problem. I was learning templates... (by MWH)
August 2010 Pages: 1... 25262728
  Archived months: [jul2010] [sep2010]

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