Beginners - June 2013 (Page 3)

Access Violation Reading File
 
I'm getting this acess error trying to read in from a file. Error First-chance exception at 0x77cf8dc9 in Testing_OpenGL.exe: 0xC0000005: Access violat...
[6 replies] Last: I replicated this segment of code in a diferent project and it worked.... (by nano511)
Confused about doubly linked lists
 
I am reading "Programming Principles and Practice Using C++" by Bjarne Stroustrup. I am currently on chapter 17.9.3 (just informing those of you who by any chan...
[3 replies] Last: @MikeyBoy @kooth Thanks you very much! Now I understand everything! (by benbalach)
Expected init-declarator before "int"
 
I am here with a problem again. I am still working on my ticktacktoe game. I have tried everything i know to code that game again using arrays. At the end of th...
[12 replies] Last: it is the last code which works fine: #include <iostream> #include <... (by closed account 1v5E3TCk)
symbol &
 
Hello, What is the meaning of (1&3) Have you some example where it is good to use such a condition? Thanks
[2 replies] Last: For example to determine whether an integer value is odd or even. if... (by vlad from moscow)
Counting Variable Names
 
I'm stuck with coming up how to create this program that lets you enter a sentence and then counts how many of the words it contained were by C++ approved varia...
[6 replies] Last: Pure C++98: #include <string> #include <iostream> #include <sstream>... (by JLBorges)
Bitwise opperations
 
I've not done much work on using variables for bit flags so I wanted to check that this is correct before putting it into my code. Lets say if I want to chan...
[15 replies] Last: @naraku9333 dont worry the overlap is intentional there. And yeah I w... (by TheBeardedQuack)
boost shared pointer
 
I am trying to learn shared pointers the code as is works fine. #include <vector> #include <set> #include <iostream> #include <sstream> #include <algo...
[4 replies] Last: Looks OK to me. On line 26 you create a shared pointer to the dynam... (by MikeyBoy)
by Jayzen
Generator
 
Write your question here. Hey guys please help me whit this ..how can i generate A random names in c++ as an example You type 10 names the programe needs to...
[1 reply] : > You type 10 names the programe needs to genrate and pick randomly 5... (by JLBorges)
Removing unneeded values from a file
 
Write your question here. Hello all. I am having problem with deleting unwanted data from a file. For example: if the file is like given below: 0 7 9 0 7...
[no replies]
by nasser
need an explanation
 
i can't understand this code please (i'm a beginner) #include<iostream> using namespace std; int main() { int numbers ; int *p; p=numbers; *p=10 ...
[2 replies] Last: Thx alot (by nasser)
Problem with the if statment
 
Okay so I learned the if statment today and tried combining it with a calculator. And I thouth if i wrote if(ans = 100) { cout << "You are awesome! \n \...
[1 reply] : Try this : if(ans == 100) Equality operator, not assignment. HTH... (by TheIdeasMan)
special format specifiers in scanf
 
How exactly does %[\n] function? what is role of * in %*c (though it's explanation is already present under scanf,yet it appears vague,so pls explain) ch...
[4 replies] Last: I get it now.Thank you cubbi. (by supraba)
How is this done?
 
Let's say you have a class named Girl. Then you declare: vector<Girl> girl, girlfriend, sister, student, date; Then later you have assignments like girlfr...
[2 replies] Last: This works. I should have thought of that from the very beginning. N... (by prestokeys)
My First Official Attempt
 
I decided to take up learning C++ (as I'm sure has been said an untold amount of times). For my first (but unoriginal) project, I decided to create a CLI Simple...
[4 replies] Last: I would have a case for option 5, then there is no need for line 50. ... (by TheIdeasMan)
by anzhit
Calendar program
 
i had to make a program to print a calendar taking the input of number of days and the first day of the month from the user . the sample output given in the que...
[no replies]
interactive while loops
 
Hi, I am new to this forum and I am having trouble with my interactive while loop. I can't get my program to loop three times, it will only loop once and it won...
[6 replies] Last: That's because your code tells it to do that! I'm confused. Can you ... (by kyiro37)
Incorrect input function
 
Hey everyone. I'm trying to write a function that reads in a double and checks for incorrect inputs, but it won't let me output the value in main. I have a func...
[2 replies] Last: Cool. So just pass by reference and it's good. That helps a lot. Thank... (by rorschach775)
Adding days to a date
 
We were given an assignment to add a number of days to a date. So I would add for example 10 days to Jan 20, 2013. I understand operator overloading and I an i...
[3 replies] Last: - first I will convert (day,month,year) (Gregorian) to Julian day numb... (by tntxtnt)
issue with looping a ifstream
 
Using any numbers found in a text file for example 3,5, and 8. It appears the the last number such as 8 will be added twice in the total number and I am not qu...
[2 replies] Last: ahhh that makes sense, Thank you. (by kingkong200)
Cin restriction and not rounding the results.
 
I have been trying to figure out how to limit the input up to two decimal points (e.g it would not accept 5.432 only 5.43). I have tried to do : cin >> fixed ...
[no replies]
June 2013 Pages: 12345... 49
  Archived months: [may2013] [jul2013]

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