Beginners - March 2013 (Page 44)

Error: string subscript out of range. WHAT'S WRONG???
 
string findwords(string line, unsigned startpos) { while(startpos != line.length()) { while(isspace(line )) { startpos++; } unsigned endpos...
[2 replies] Last: Yeah, I know the error means I'm trying to access a character in a str... (by sn1kwah)
Program giving wrong output
 
So I'm just trying to write a program that calculates the area of a rectangle by unnecessarily using functions. Here's the code: #include <iostream> usi...
[3 replies] Last: The tutorial available on this website http://www.cplusplus.com/doc/tu... (by georgewashere)
by Pebble
Runtime_error
 
I'm trying to catch division by 0 (zero) using runtime_error. The program functions ok until i enter zero as the second number, Then i get a window pop-up aski...
[6 replies] Last: Thank's Cubbi. (by Pebble)
Negative digit...
 
hello everyone i write a program that seperate digits of the logged number but when the number is negative it's not work... old code: int _tmain(int argc, _T...
[4 replies] Last: Wolfram Mathematica thinks it is positive :) As I say there is two sys... (by MiiNiPaa)
How to use class in another class?
 
Hello, So my program is supposed to take two numbers and form an interval(class). Then another file creates an IntervalSet(class, vector of intervals). I can't ...
[4 replies] Last: This may not matter but shouldn't you be using floats as opposed to do... (by lamentofking)
How to set a bit?
 
Hello, I want to write a function that sets multiple bits. Here is how it should look: The user gives a positive integer, like 5. It then prints out the bi...
[4 replies] Last: Thank you for replying, my program works! thanks (by dutchman)
by ussed
pointer to enum in gcc linux
 
os archlinux 64bit gcc #include <stdio.h> #include <stdlib.h> #include <string.h> struct vect{ float x,y,z; }; struct tchk{ enum g{i,l,m}; // i l...
[2 replies] Last: Thank you MiiNiPaa (by ussed)
by ihato
How to make a worded operator?
 
Is there a way to use letters instead of signs for operators? class MyClass { public: int x; MyClass(int a){this->x=x;} int operator + (MyClas...
[4 replies] Last: A comma-delimited worded operator; really a ,add, operator: My brai... (by Disch)
by eddyq
expand workspace view
 
In Code::Blocks, is there a way to: 1) with one click, expand the workspace view? 2) make the workspace view linear?
[no replies]
Fibonacci Small Problem Help
 
Hey everyone, I was asked to write a code that has the user input a number and then the computer calculates it for the Fibonacci series. The output should b...
[2 replies] Last: For me, Use <space> per number. Then print the period after the proces... (by asdlkjqweo)
by abzksm
help!!
 
how to output square like this ***** *....* *....* ***** using for loop any idea
[2 replies] Last: #include <iostream> #include <iomanip> int main() { while ( true... (by vlad from moscow)
Help
 
#include<iostream> using namespace std; int main() { int const n=5; int k=0,i,B ,R ={3,-2,6,1,2}; for(i=0;i<n;i++) { if(R >3) { B =R ; k=k+1; } ...
[4 replies] Last: LOL Matri X it was alright i just thought i have more numbers greater ... (by Alban Gashi)
Exporting data to Notepad
 
Can you show me a tutorial to export data used on a program of C++ to a Notepad/Excel or explain me what to do :)
[1 reply] : Output the data to a .txt file for notepad. There's nothing special yo... (by Chervil)
by scar95
Why isn't it converging?
 
Guys I got this code, which uses the jacobi method to find the solution of a system of equations. The problem is, it's not converging, why? #include <iostream...
[8 replies] Last: What he means is this: const int EPSILON = 1e-8; will produce 0 bec... (by OxBADC0DE)
error C2143: syntax error
 
Hi all, I am learning C++ from 0. I have a very simple code: #include <iostream> using std::cout; using std::cin; using std::endl; int main() { int numb1; ...
[2 replies] Last: Thank you Peter87 so much, I had another error also: >= i instead of ... (by HeavyRain)
Search for string, print line
 
Hi guys I'm trying to write a code that searches a file for a string from the command line line-by-line and prints each line with the string. I have this ...
[3 replies] Last: #include <iostream> #include <fstream> #include <string> #include <cs... (by vlad from moscow)
C++ Struct Part Type Problem
 
Hello Everyone, Off the bat I want to say that I am just learning programming so if my code is missing basics I apologize. I was hoping that you might be abl...
[2 replies] Last: Any program in C++ shall have function main. Also you incorrectly spec... (by vlad from moscow)
Is it worth to keep on learning C++?
 
I have been learning C++ for a while, not to long as in years of experiences. I am comfortable programming in C++, do not get my wrong, I am currently learning ...
[6 replies] Last: In regards to the speed of C++, it translates to assembly and machine ... (by pholotic)
Do I need to study CS fundamentals before going to University?
 
At the moment I am reading "Programming Principles and Practice Using C++" by Bjarne Stroustrup. I've read half the book. In autumn I am starting university, wh...
[1 reply] : It never hurts to get ahead of the game. Find your passion and pursue ... (by pholotic)
How to program in C++ properly (using libraries and stuff and "what's wrong with me!!?"))
 
Hi i'd like to learn to use C++ for my homework assignments (instead of always using Octave). the problem is i've been unsuccessful at using "libraries" ou...
[3 replies] Last: thanks you guys, do you have any IDE's that you recommend? (by odranaiibok)
March 2013 Pages: 1... 4243444546... 87
  Archived months: [feb2013] [apr2013]

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