Beginners - April 2013 (Page 35)

Segfault on getline
 
I get wierd segfaults on the following code: ...... scanf("%d",&n); for(int i=0;i<n;i++) { int x=0,y=0; int tot=0; ...
[9 replies] Last: I've fixed that, however it has nothing to do with the segfault. It se... (by andrepd)
What am I thinking of?
 
I remember there being a thing that was great for classes. It was like an array but it took words and everyone of those words has an int value assigned to them....
[4 replies] Last: You're welcome. In future googling "c++ numbers integers structure" o... (by agnophilo)
by Aquos
What is the purpose of C++?
 
Like the title, I want to know about the purpose of c++, is it the c++ is a component in order to make a software (eg: os etc), please experts give a quick hint...
[6 replies] Last: I'm no expert, I'm a newbie myself. A little less green perhaps. (by agnophilo)
error: assigning to 'char' from incompatible type 'const char [2]'
 
I'm writing a proportions calculator. Don't worry about the first part :) #include <iostream> #include <fstream> #include <string> using namespace st...
[4 replies] Last: I am confused, tell me what input you're putting in. (by agnophilo)
trouble with cpp problem, for loop, need Help!
 
I am starting out with cpp and having trouble to solve this problem I know that it needs a loop but I cannot seem to understand the structure. If interest is...
[1 reply] : Just create a loop that outputs each of those values to a global varia... (by agnophilo)
by zmlink
question about input values
 
what does it mean when in pseudocode when you are to "input 0 to terminate:" is this a loop ending its confusing me because its stated before the while loop i...
[3 replies] Last: The for loop and the while loop are not the same thing. http://cplu... (by agnophilo)
Array question?
 
When you declare an array for example: const int size=4; int array ; what is the correct word to use to describe the in the array?? Thanks
[3 replies] Last: Or if you mean the symbols themselves (parentheses) {braces} So in... (by agnophilo)
How to do this if not this
 
//Check if one number is 0 if(numerator1>0){ if(denominator1>0){ if(numerator2>0){ if(denominator2){ cout << "There is no unknown varia...
[2 replies] Last: If (numerator1 == 0) && numerator2 == 0 && denominator2 == 0) cout <<... (by agnophilo)
by shrina
file reading txt
 
Can anyone please explain the following code line by line in file reading string line; for (int i= 0; i<player; i++) { getline(file,arr...
[4 replies] Last: So how can we store the round 1, round 2 those details?? (by shrina)
by xnorax
polymorphism c++
 
class Butterflyfish { protected: string Btype; public: virtual string type() { return Btype; } void display() { ...
[7 replies] Last: Good. (by keskiverto)
Function question
 
Is void a return type or what type of function is it? Can someone explain the differences between int and void functions? Thanks
[2 replies] Last: The type of the function is the type of data it returns. Declaring it... (by agnophilo)
Decode JPEG image
 
Dear gurus, I try to decode jpg images as according to following steps: 1. Read the image file using ifstream 2. Decode the information (without any existin...
[2 replies] Last: I need to do the jpeg encoding/decoding by myself. Later I will try to... (by activecat)
Help!
 
I need quite a bit of help... I know one problem that has came up with my program as it is now is using a while loop for the choice, and it will loop infinitely...
[4 replies] Last: the program is suppose to create an initial shape of ***'s in anrray d... (by bill265)
Storing Strings in arrays
 
Hi! I have a tab delimited file that looks like this NAME AGE HEIGHT WEIGHT REMARKS Pupil1 15 176 190 overw...
[3 replies] Last: "Some sort of array" depends on how you are going to access elements, ... (by vlad from moscow)
by Zu007
how to create exe file?
 
How to create Exe file which run other exe files.e.g there are exe two files file1.exe file2.exe and make a programe in C++ to run these exe files. how to do th...
[3 replies] Last: #include <cstdlib> int main() { std::system("file1.exe"); st... (by Catfish3)
books for java beginer
 
I wanted to know about some book which can master me in JAVA.I know nothing about java but have a nice experience in C++.Also suggest me a JAVA compiler to begi...
[5 replies] Last: www.google.com (by mutexe)
Beginner troubles
 
I just bought a book on C++, as i am very new to this, only my second day, this might seem incredibly dumb to ask, but ive searched online for the answer and ca...
[4 replies] Last: fatal error: iostream: No such file or directory Your compiler does ... (by keskiverto)
by shrina
Reading from a txt file
 
hey people can someone please tell me how to omit reading the headings in a txt file?
[3 replies] Last: Assuming that the name does not contain white spaces, something like t... (by JLBorges)
Convert line in text file to another format
 
Hi, all, I am using CodeBlocks 12.11 with IDE on a Windows system and writing a console program. I am progressing with various pieces of my project, which...
[2 replies] Last: Hi, JL, Thank you for your reply. The input for lines 3 and 4 comes ... (by mhlester)
vector + array
 
Hello, a better title would be "store partition number in a 2D array" I have two small portions of codes which are working fine separatlly CODE 1 and CODE...
[2 replies] Last: Hello again, I have managed to solve the problem, everything is fin... (by mikimaise)
April 2013 Pages: 1... 3334353637... 83
  Archived months: [mar2013] [may2013]

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