Beginners - July 2009 (Page 19)

Sorting strings using pointer array
 
I am working on sorting an array of strings using pointers,( I want to keep the original order but have the pointers sorted so that I can print out a sorted ord...
[3 replies] Last: Pointer to a pointer to a string. (by Duthomhas)
Trying to get my class to display numbers as well as characters
 
Hi Guys. I have been having a problem with a new class im writing. I have managed to get the class to return a score which I want but I can't implement any c...
[no replies]
Why no built-in range checking with vectors?
 
According to Stroustrup in "The C++ Programming Language", "The standard library vector does not provide range checking by default." I.e., struct Entry...
[1 reply] : For efficiency reasons, it aims to be as fast as an array, and it is. ... (by kbw)
by Faken
outputting files with a zero in them
 
Hello, I've posted this question before, but no one answered me... I want to output a bunch of data (contained in a buffer on a block of memory) in which...
[3 replies] Last: Dufresne, Thanks for your response. I gave that method a try, well... (by Faken)
by Lucien
Why doesn't this work?
 
Hi, I want to write a program which reads all the x'es from my input. Can anyone find the mistake in my code? I work from a book: Sofware engineering i...
[1 reply] : You need to use '==' to compare stuff. if (d = 'x') is the problem... (by firedraco)
by j3lps
Pointer to a parent class?
 
Hi All, I'm fairly new to C++ and have mainly been learning from a couple of books, but I'm working on a complicated (for me) project for a masters, and wonder...
[2 replies] Last: Thanks Bazzy, that seems to have worked. I put ptr_to_plant = this; ... (by j3lps)
Compiling multiple files in Ubuntu
 
Hello everyone. I am very new to C++ as well to Linux and I ran into a problem that I don't seem to solve on my own. I am doing some C++ exercises and the o...
[2 replies] Last: Thank you for the answer. I will try some IDE-s. Thanks to your comme... (by Terviseks)
by vivmen
Exe do not work
 
hello all i hae written following program to copy entire folder in c++ , it works on my pc where i develope it . but when i copy exe to my friends co...
[5 replies] Last: Another thing. WHERE in the world are you living and WHERE is your fri... (by NoobsDeSroobs)
Comparing strings with strcmp
 
I am trying to sort an array of strings so I thought of using the strcmp BUT I am getting a syntax error on this line if(strcmp(names , names ) < 0) The...
[3 replies] Last: Thanks! that was driving me nuts. (by asavage)
Point of Sale System- urgent
 
Hi im in computer science one and am just starting out. I wrote this program but it has some errors. I was wondering if you could help me fix the errors. It h...
[2 replies] Last: Look at the difference in structure between your tax and display_menu ... (by mcleano)
IF/Else Selection Structure Problem
 
\ This is my first post so bare with me guys. We are studying if/else selection structures in class and I wrote this program. #include <iostream> #inclu...
[3 replies] Last: I see...Thx guys... (by lapzter)
Run Time Error with Pointers and Structs..
 
So I'm trying to create a struct that contains a single int data member, and separate from the struct I am trying to create two global functions, each of ...
[3 replies] Last: If you need it, here is a good tutorial: http://www.cplusplus.com/doc/... (by Bazzy)
by Goofy
Find average, Using array's and functions
 
Hi , I'm new at C++ and I want to demonstrate you that :D I'm doing very hard to understand Arrays, I read them in 3 books and I'm not getting them up, I watc...
[6 replies] Last: thanks very much AR Khan. and ty you mcleano I'm using dev-c++ , but ... (by Goofy)
Linking errors
 
I'm writing a code that decrypts certain text files using arrays. There is a permutation of 20 integers, and it applies the permutation to a character strin...
[3 replies] Last: appreciate it guys, another one of my glorious noob mistakes!! (by sross07)
Access violation Problem With Two Classes
 
Hello, I have two classes that have for member variables pointers to objects of each other like so: // class A.h class B; #include "class B.h" class...
[6 replies] Last: Thanks Disch. I'll give this a try. EDIT: after giving this a try i... (by AngelGithara23)
by chria
function with predefined value
 
Hi I'd like create a function ex: function(int value1, int value2, int value3=1). That is if you just call the function with two arguments ex: function(1,2)...
[4 replies] Last: Thanks! What I did wrong then was to define the value in my .cpp file ... (by chria)
Need to sort multiple arrays
 
I've got a program where a user will enter a student's name and numerical grade. The program will then determine the letter grade based on the numerical grad...
[7 replies] Last: Thank you, thank you, thank you. Specifically Bazzy and Kempofighte... (by cableguy414)
Creating a linearly increasing vector
 
Hi everyone, I have a bit of a strange problem at the moment. Have written the following function to create a linearly increasing vector, with a defined star...
[1 reply] : (b - a ) / num is integer division since a, b, and num are integers... (by jsmith)
Class functions undeclared, don't know why!
 
Hi again everyone, I'm having trouble with writing functions for my vectordouble class. I'm trying to create a function that essentially does what the Matlab...
[6 replies] Last: Ah, fixed it. Thanks for the help everyone (by munman09)
converting problem
 
ltdtombs isn't working.i take this error "cannot convert `std::basic_string<char, std::char_traits<char>, std::allocator<char> >' to `char*' in assignment " i ...
[10 replies] Last: ok.thank u (by areyoupp)
July 2009 Pages: 1... 17181920
  Archived months: [jun2009] [aug2009]

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