Beginners - March 2012 (Page 49)

list inside list Iter1->list2.push_back()?
 
I'm trying to add values to a list inside a list after looping through the lists with iterators. Here is an example of the structs used as the types for the li...
[2 replies] Last: Can you have a iterator inside a constant iterator, or do both iterato... (by snipslog)
while loop
 
1.What's the difference between this while(1) and this while(true)? 2.r = card % 13; // r = random 0 to 12 s = card / 13; // s = random 0 to 3 how's th...
[6 replies] Last: Hi darkovasic, In the future, please post using "code tags" (they'r... (by ReedTompkins)
exception thrown
 
im working on a program that just copies info from a text file into an array, the info that in the file is 25.86 59.73 62.73 1000.00 3.28 42.87 19.66 -...
[3 replies] Last: It depends on what is your current directory. (by vlad from moscow)
Quick function question
 
I see this: #include<iostream> using namespace std; void function(); int main() { //some code function(); return 0; } void function(){ ...
[3 replies] Last: Okay! Thanks both of you for your explanations! (by georgep)
by wtf
Do I need to do this:
 
Do I have to enclose subsequent calls to a function withint new try blocks each time? Suppose when catching an error, if I clean up and retry it again, Will ...
[6 replies] Last: @Moschops: I agree thats probably better. However, my code uses 're:... (by wtf)
by n8c
dereferencing a pointer that is a member of a class instance
 
hello and sorry if this is a frequently asked question but is this how to access a value of a variable pointed to by a pointer that is a member of a class insta...
[2 replies] Last: You could have gone that last step and actually run your code. http:/... (by Moschops)
case manipulator
 
I'm getting confused with the changing of the letters. I'm supposed to use 3 functions upper, lower, and reverse. The upper should accept a c-string as an argum...
[10 replies] Last: thanks, but it still didn't work. (by kdmpenguin)
battleship game help
 
Hey all I have an assignment in a level 5 course. I'm lost on how to create a full 5x5 grid battleship game. Any help will be useful. We use Borlands C++. I loo...
[3 replies] Last: First of all, you should consider your grid. Before programming, plann... (by WilliamW1979)
char str[20] != "mystring"
 
When I use ifstream::get() to get a char*, store it in char , and compare it to a string it returns false. When I check the debugger, block is the same as the s...
[12 replies] Last: Currently it is only using getline to extrace values and ignore to ski... (by snipslog)
by denim
Array help
 
I'm new to C/C++ and I'm trying to grasp arrays. Here is where I'm at so far with this program. Essentially I want it to be able to print out the entire array...
[2 replies] Last: If this isn't a school project and I say this because they have criter... (by WilliamW1979)
[HELP] array of structures code help
 
Design and implement the following program. 1. You have been hired to keep track of the available speaker’s for the local Computer Tech Club. 2. Create a s...
[4 replies] Last: So I do not know if i quite good understand your instructions at point... (by Anon777)
Jumping over initialization with goto
 
I'm trying to check a list if something is already stored in it, and add it if it is not. If it doesn't exist, the goto statement jumps over the code that store...
[2 replies] Last: Thanks, I've never seen a list iterator in a while loop, so I didn't t... (by snipslog)
string to char ?
 
I'm trying to convert int to char* or char or whatever it is. int main() { int m=50; char *a[m+1]; int i; for(i=0;i<m;i++) {...
[1 reply] : There is no assignment operator (=) with a char lhs and string rhs. Y... (by Texan40)
Need help in creating basic c++ functions
 
yacht race problem Create a C++ program that establishes the average speed of yachts in a race over a distance course of up to 100 nautical miles. This prog...
[6 replies] Last: Someone probly hit it on accident (by Max Edgar)
15
 
;;;
[1 reply] : same in http://www.cplusplus.com/forum/general/64120/ (by viliml)
Add int in strcpy()
 
Hi! I'm pretty new to C++, and i got a basic question... Is there a way to put and int in a strcpy / strcat ? char* Movie::toString() { char* info ...
[4 replies] Last: Thanks! It worked really well with sstream! I did not need to have cha... (by skullburn)
can't sort out logic progression of loop
 
The code below is part of a much larger program. I'll post my psuedo code/outline as well and hopefully you can see where I'm trying to get the code to. At the ...
[2 replies] Last: Your pointers about indenting were really helpful, thank you :) but cl... (by agentredfield)
A Query Regarding The Static Storage Class Modifier
 
Static objects with no linkage are found within a local scope, such as a function body. Since functions can be called again, and again, the static object can be...
[6 replies] Last: I understand now. Thanks for all your help, JLBorges, and you too, C... (by closed account zb0S216C)
using an or statement for multiple items?
 
How do I say if grade equals 69 or 79 or 89 etc. I tried using the or symbol but that didnt work (it made the sign a + for every input no matter what). Is there...
[9 replies] Last: Well, anything that doesn't equal 0 OR evaluate to false (0). (by ciphermagi)
by atjm88
Error for Win32 Project(In VSC++ 2010)
 
Hi, I try to create Win32 Project(In VSC++ 2010) but it give me error 1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 refer...
[3 replies] Last: Wow..This code is so long... Thanks for the info...But the Win32 Prog... (by atjm88)
March 2012 Pages: 1... 4748495051... 71
  Archived months: [feb2012] [apr2012]

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