Beginners - January 2009 (Page 6)

by dhanny
i++ or ++i
 
Hi, mates! I cant remember where i heard it, but i know that in loops, for example for(int i=0; i <=100; ++i) {...} it is more efficien to use ++i th...
[4 replies] Last: Typically, post increment (i++) requires a temporary, whereas pre incr... (by kbw)
by dhanny
Problem with a function argument
 
I'm trying to parse a math expression into a tree. My question is of what type the "root" argument should be? I guess this is where my program crushes. Here i...
[6 replies] Last: @marko: Pointer references are actually used. They break encalsulation... (by Corpus)
by masiht
trouble in downloading visual C++
 
I have a problem in downloading microsoft visual C++ express from the website www.microsoft.com When I clikc on download in this website the next page doesn't ...
[2 replies] Last: two things. if you dont have microsoft silverlight, than the site ma... (by EricM260)
by masiht
simple program error
 
Hello I am trying to compile my first program, but it doesn't show the result. Here is what I did. On the File menu, point to New, and then click Project…....
[14 replies] Last: @ masiht use the system("PAUSE") function after your cout << "Hello W... (by EricM260)
Complicated response- just please look at it, too long to fit in title
 
Hey, So I'm writing this fairly low-end program (just if's else, cout, cin) trying to emulate a (pretty bad) simulator. Here's my code: // SimTalk.cpp : ...
[3 replies] Last: thanks (both of you) (by rubecuber)
While loops are killing my program
 
Hi I'm doing some simple programs for class. In one of them I installed some error prevention using while loops basically just to keep someone from entering a n...
[5 replies] Last: nice catch thanks (by therealdeliverance)
Questions About Array Declaration
 
Dear all, Some time I see such a code: int array = { -2, 99, 0, -743, 2, 3, 4 }; int array_size = 7; Why and size is separated and why ...
[2 replies] Last: Well, the above code is stupid. The size is omitted usually so that t... (by jsmith)
multiple inclusions of a header file
 
I have read about how to avoid multiple inclusions of header files.But what problem does including multiple inclusions of the same header actually cause? Im sti...
[3 replies] Last: Actually, with proper include guards, including the same header file t... (by Zaita)
by Vector
setprec on value unaccessable outside of loop
 
how would i use setprecision(2) on a value that i cant reference outside of a loop? for example: ( pun intended ) int a = 0; cout << "hey, the conte...
[1 reply] : Your loop looks very wrong. For loops have three "parameters": an init... (by Zhuge)
C++ Final Project!
 
I need help with this final project for my C++ class. Here it is: C++Final Project. Construc Lab that inclues 4 functions that gets the name of the employee...
[11 replies] Last: LOL! He was back 1 minute after the "I'm never coming back"-post. (by Corpus)
by yasser
please .. How Can I Add a Title
 
How Can I Add a Title To The Program that we can see it on the Top bar ? I think we use system ("??????") or some thing like that ... Also add colors...
[7 replies] Last: I gave you a link to the win32 API where it says which functions to ca... (by Corpus)
Serialization (Pointers)
 
Hi All How do I serialize objects that contain pointers ? Thank you .
[no replies]
Program delay with getch();
 
Basic program, you have to press a key, and if the key is for example 'a', the program inputs "LOL", or smth like that, I hope you understand what I mean. The p...
[3 replies] Last: cout (C++) is better that printf (C) flush is just a simple man... (by Bazzy)
delete some part of an Dynamic array
 
Hi , How can I delete some part of an Dynamic array ? I create ed a dynamic array : class User **User_list; and in the middle of my Program ...
[1 reply] : I think you should look for STL lists http://www.cplusplus.com/referen... (by Bazzy)
i need a good book or resource to understand pointers please
 
hi can you help me to find a good book or a resources that describe pointers well
[1 reply] : http://www.cplusplus.com/doc/tutorial/pointers.html (by closed account z05DSL3A)
Assigning float numbers to 2D arrays.
 
Hi! I want to work with a 2d array but I get problems when trying to assign values to it. The problem might as well be in the construction of the array since I...
[2 replies] Last: I "solved" the problem. Probably the problem was that the input *no_of... (by bjarkmar)
Needing assist in my assignment.
 
// uses DEV-C++ 4.9.9.2 compiler // #include <iostream> using namespace std; // struct for storing drinks variables // struct drinkID { float...
[5 replies] Last: that is correct. static remains but in your case I don't see why you u... (by anders43)
by Morgan
Array troubles
 
I am attempting to assign a user defined string to an array, What is the best way to do this?
[3 replies] Last: That means an array of strings - that is probably not what you want. ... (by Corpus)
by Morgan
strcmp doesn't seem to be working
 
I'm trying to compare 2 strings. I'm using the Dev-C++ compiler in case that matters. Here's the code i have: #include <iostream> #include <cstring> #inclu...
[5 replies] Last: http://www.cplusplus.com/forum/articles/6046/ (by Zaita)
dinamyc vector of pointers
 
Hello, I've tryed to assign fields in a string to the element of a vector of pointers to char. Because the number of fields in the string is unknown I've declar...
[3 replies] Last: There is the resize function for that http://www.cplusplus.com/refe... (by Bazzy)
January 2009 Pages: 1... 45678... 16
  Archived months: [dec2008] [feb2009]

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