Beginners - November 2008 (Page 8)

Containers of const objects: some questions
 
Hello everyone, I'm wandering why I cannot declare a vector or list of const objects if the class of these objects does not define a default contructor. For...
[6 replies] Last: @seymore15074: The choice of the container should be dependent on the ... (by exception)
Bitmap problem in headercontrol
 
Hi all, I have use listcontrol and headercontrol to create a list form. There are 3 columns for this list. In the first column, i want to load the bitmap(sor...
[no replies]
Beginner C++ Employee Payrate Generator
 
I'm taking an intro to c++ class this semester and I'm a little lost on how to write this program project I have. I was wondering if i could get any help on thi...
[11 replies] Last: After working on this for a while longer Ive scratched that whole thin... (by jfp2716)
by Bucky
Ifile.get() is returning a space (' ')
 
Hello! My name is Matt. Disclaimer: Don't mind my primitive syntax; there is a limited amount of C++ that I actually know. Preface: I have a function that...
[2 replies] Last: ... well, because I'm so new to programming, I haven't gotten in to v... (by Bucky)
Unable to compare strings, need assistance.
 
I'm making a study guide for my NJROTC class, and I cannot compare the strings of my user's guess of the order with the correct order. I should be able to, so I...
[8 replies] Last: Thank you all for your immediate advice. I took QWERTY's advice of usi... (by Warrior2089)
by jrock
structure and unions
 
im trying to use two structure with a union of two member dont know if i am declaring it right or not #include "stdafx.h" #include <iostream> #includ...
[1 reply] : Well, you might want to remove the extra ` characters...other then tha... (by firedraco)
overload problem?
 
#include <iostream> #include <iomanip> #include <string> #include <sstream> #include <fstream> #include <vector> using namespace std; struct Name // s...
[12 replies] Last: thanks (by Prada8787)
String array
 
I am trying to write a file that reads from a file, prints the file on the screen, and prints the info into a second file. This is the code I have now: #incl...
[14 replies] Last: char str = {0}; // make an array all set to null. // after ... (by Zaita)
Looking for some advice - Please Look
 
hi there, Im a complete beginner to programming (i.e have never learnt jave, php, html, c#, c++ etc.) and would like to know which one would be the best to s...
[5 replies] Last: Yes Game Maker is cool for a beginner but with that you can't create e... (by Bazzy)
Declare Variable(s) During Runtime
 
I am using an OpenGL wrapper called: "SFML" and there is a class that exists to load images from a particular file location: sf::Image myImg;//Create new ...
[7 replies] Last: If you want to learn more about maps take a look of this http://www.cp... (by Bazzy)
snake game need clarification
 
Hi, Im taking programming 1 for the first time at my school this semester, and the final assignment we had to make is write a snake clone. After weeks of extens...
[6 replies] Last: In the y loop (before the brace at line 169) (by Bazzy)
by sacred
Sorting a vector of words alphabetically?
 
Hi I have a program in which I read (using ifstream) words from a file into a vector word objects - The word is stored (as a string) as well as a few other a...
[2 replies] Last: Could you be more specific about what you are storing? That way we no... (by seymore15074)
Doesn't recognize string
 
even after including the string library, For example, in this code: #include <fstream> #include <iostream> #include <String> using namespace std; S...
[7 replies] Last: ty for the help, i had all the strings in capitalized because the prev... (by someguyz69)
by Hubson
Sort of knapsack problem.
 
I`m having problem writing a program, i input N items with their weights, for example item1 = 3kg,item2 = 4kg, the sum of all item`s weight is EVEN. First i nee...
[4 replies] Last: Yes, I never said there was a known optimal solution. The point was t... (by jsmith)
Restore a stream ?
 
Hi, mates! After reading a sream, for example : string str; getline(cin,str); i need to restore it to its previous state, saving the information in str...
[10 replies] Last: Good to know! Thank you again. Sorry if my question was stupid. (by MrProfit)
by lixo1
Convert comma to point
 
Hi everybody I would like to know if someone knows a easy way, for example using fstream to verify if a file contains comma "," and if it contains replace it w...
[10 replies] Last: Hi Bazzy, Great, great, perfect!!!!!!! It's absolutly that I want, a... (by lixo1)
Converting this small chunck of code to C++ (1,2)
 
Hey guys just from some code in java, how would this look in c++ try{ Runtime r = Runtime.getRuntime(); r.exec("mspaint.exe"); } catch(Exception...
[20 replies] Last: Well just letting you know - so far everything is running smoothly tha... (by Mythios)
writing a cellular "game of life" program having a little trouble
 
Thanks for the help
[8 replies] Last: Ah...Yeah I just noticed that ^^; the problem is: for (g=0; i < n... (by firedraco)
Const char to C-type String problem
 
Problem just as simple as question: there is an 'if' and depending on result, file address will be assigned. I've tried as following: char z ; int a; ifstre...
[4 replies] Last: Thanks for this function. This I was looking for ;) (by Pethrenne)
printing a user input in a array of char
 
I am using windows vista for my C++ program and a beginner so please keep it simple. Lets say i have two functions, and one functions which is void contains ...
[3 replies] Last: Alrighty, Got it. Thanks. (by mrgoogle)
November 2008 Pages: 1... 678910... 19
  Archived months: [oct2008] [dec2008]

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