Beginners - September 2009 (Page 21)

by tiger
linked list problem
 
I have a problem in my simple linked list program #include "stdafx.h" #include<iostream> using namespace std; struct link { int data; link *nex...
[2 replies] Last: comments included void linklist::add(int d) { link* newlink... (by anilpanicker)
Strange ostream problem
 
Hello all I have a little strange problem with printing bytes to an ostream. I got the following Method for printing a byte: ostream& write_byte(ostre...
[2 replies] Last: aaah i knew it was that easy thank you very much (by Gammler)
few questions to explain
 
Hello.I am learning C++ and i don't wanna go any further beacuse I need some explanations. 1st:What is the difference between (increment): i++ and ++i 2nd:Cou...
[3 replies] Last: 1: http://www.cplusplus.com/doc/tutorial/operators/ - scroll down to ... (by Bazzy)
how to pass reference of a string
 
Hi everyone! I'm trying to use "string" library. I wonder that how a "string" is treated, as a normal variable or an array. For example #include<iostrea...
[2 replies] Last: Also, DON'T use: main() or void main() Please use: int ... (by firedraco)
function fun
 
Basically I wanted it to: create a new function then take 2 strings of text then add them together where did I go wrong? // default values in func...
[4 replies] Last: If you don't need functions to return anything, make their return type... (by helios)
by wtf
Uncontrolable flowing of screen when wrong input (char instead of int)
 
I know this is a very common error for beginners, but I'm just trying to find some clever ways of fixing it. It seems strange to me that if you program calls f...
[6 replies] Last: You must always check against bad input. Using cin.clear() won't ch... (by chrisname)
getline()/eof problem
 
Given // must use char array char inList ; this code works fine, reading text from file: fstream theFile; theFile.open("genres.txt", ios...
[4 replies] Last: Agreed - checking status is sensible. Thx. (by paoloricardo)
by hannes
3-dimensional array
 
hey everyone, i have a problem about a three dimensional-array. how do you assign a null-string to the array?? hier is the declaration of the array and th...
[3 replies] Last: I don't understand what you're asking. Did I tell to get rid of it? (by helios)
by pino
default constructor
 
With reference to the following example: class example { public: int a,b; }; int main() { example ex1; cout << ex1.a << endl; ...
[15 replies] Last: the default value to store the new allocate memory is oxcc No, that's... (by helios)
ofstream Problem
 
Hi all. i just make some code to reverse a string.but problem is it's making garbage. like it read "hello world" from input.txt ,no problem but in output.txt ...
[3 replies] Last: Here is a suggestion but it is up to you to rewrite the program. Sinc... (by kempofighter)
Regular expressions
 
I was going to make a basic text editor, with syntax highlighting (sorry, ed - you still hold a place in my heart). I have a function to create a text file usin...
[5 replies] Last: I'm calling mine cedit. Given that the second letter of what the c ... (by chrisname)
very simple program with string manipulation not working
 
I have this program here. Only problem is it isn't converting to uppercase. #include <iostream> #include <string> #include <ctype.h> #include <string.h...
[3 replies] Last: Indentation is your friend. Also hip = check(hip); Or take a st... (by Chewbob)
Ugh, segmentation fault.
 
I'm trying to get rid of this segmentation fault: #include <stdio.h> #include <string.h> #include <time.h> int main() { char* str = "Memmove is cool...
[9 replies] Last: SIGSEGV. Sorry, helios, you've been terminated. You need ring 0 acc... (by chrisname)
by sikac
Polynomials
 
hey ppl..i'm working on a class which should allow me to do basic operations with polynomials..and i didnt want to post my entire code here (its 280 lines long ...
[2 replies] Last: it means that you probably messed up somewhere in your code because 1.... (by mspy2plus)
by Dorian
Extracting specific characters from a string.
 
Hello, can some one please tell me how do I read this file "scanner.lua" and then how do I extract from it specific numeric characters? File constains this...
[4 replies] Last: I didn't get it properly, is this you want at line 33 you got the num... (by anilpanicker)
Using pow();
 
Hey, I'm trying to evaluate a value using power function. double *pmech, *vf; int nodes, i, j; float capA = 0.0209, capB = 0.219; pmech = dvector (1...
[3 replies] Last: Thanks, I changed the capA and capB to double, and it works now. Than... (by pkiskool)
Stop a loop with a button - I need threads?
 
I have a two buttons in a form: START and STOP. The START button starts a function with a loop inside (this loop could take a lot of time to be concluded) and a...
[9 replies] Last: Many thanks for your reply, webJose. In fact I have tried to follow ... (by jmarcos)
for loop and using char as a variable
 
// help cout << "enter numbers of names: " << endl; cin >> iNumberInputs; for (int x=0; x<iNumberInput; x++){ cout << "name: " << endl; gets(name ); } f...
[12 replies] Last: You can see this tutorial for a long explanation of new and delete ... (by Bazzy)
create and open text file
 
Good day everyone, I am still new with C++ language and i hoping if someone could teach me. I' trying to copy paste this coding and the problem is i want it ...
[4 replies] Last: Thanks a million for the advise. :)) (by sydegil)
September 2009 Pages: 1... 1920212223
  Archived months: [aug2009] [oct2009]

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