Beginners - October 2011 (Page 52)

Linked List Merge Sort Intended Behavior?
 
Hey guy's I have been trying to implement merge sort for linked list's. It works for reversed numbers, but when trying to sort random data it does not sort corr...
[2 replies] Last: I rewrote merge as follows and everything works correctly now. node... (by k3rb3ros)
Do-While Loops
 
I can't figure out how to get my program to loop back around if the user chooses Y. #include <stdio.h> int main() { // Variable Declarations float nu...
[1 reply] : I suggest a while loop, as in while (int* == *) or similar (by closed account 967L1hU5)
increase value of a data member?
 
Is it possible to do this with structs without making a new data member. For example, lets say one data member in my struct is grades and I want to bump the gr...
[2 replies] Last: thanks (by DocCeaser)
Cant find iostream
 
Hey cplusplus I am 100% new to programming, only been doing it for a few weeks just for fun. I am currently trying to follow this tutorial: http://cplusplus...
[3 replies] Last: When you create a new file (when creating a new empty project) within ... (by AMCerasoli)
Generating arrays
 
I have an assignment to generate two arrays of 100 values. One with a range of 0.30 - 1.00 and the other with a seed 1990*1*10. This is to be generated with a...
[10 replies] Last: Understood. So additionally, a search index function like int search... (by rprcmky)
cout'ing the highest and lowest data values in a set
 
#include<iostream> #include <string> #include<fstream> #include <iomanip> using namespace std ; int main() { st...
[no replies]
How to copy dynamic object A* to list<A*>?
 
Hello, recently I tried to build OOP program using C++ (and Qt) but I got an problem right now. Idea is: in function called foo() in main.cpp I need to get pa...
[3 replies] Last: Rather, you should not delete anything at all. [quote=Bjarne Stroustru... (by ne555)
Pointers to Structs
 
Trying to figure out why the addresses of &aStruct and ptr are different from the value of &strr in the function ListStruct: #include "stdafx.h" #include ...
[4 replies] Last: Thank you fun2code. Your explanation makes perfect sense. The value st... (by John Durant)
How to loop a switch?
 
Hello, How would you make the ' default ' in a switch statement , repeat the switch statement over again?
[3 replies] Last: Thanks Disch. It worked. (by Code Assassin)
by buggys
retrieving data from text file
 
OK so I've just started trying to figure out how to do it, and there's plenty of tutorials how to get a line from a .txt document, but there's no indication of ...
[1 reply] : BUT! I cant seem to find out how i would take '1' from the text file ... (by keineahnung)
can't seem to workout pennies
 
I was given an assignment where I ask the user for an amount in $0000.00 then tell him that amount in coins. for example $2500.25 would be 100001 quarters, 0 d...
[5 replies] Last: @Disch yea i made a mistake, you're right there is a penny my teacher... (by janggo2001)
function issue
 
I can't figure out what I'm doing wrong here, this program compiles and runs but ALWAYS returns the remainder as "1" even if its not. My goal here was to use a ...
[11 replies] Last: #include <iostream> #include <cstdlib> #include <cstdlib> usin... (by needtopass)
classes
 
create a called student with the data members: Name Idno, English Marks, Maths Marks and Physics Marks Member functions: void inputdetails() float calculat...
[1 reply] : a) Use Code tags. b) You have no main. c) Functions don't need a ';'... (by Gaminic)
by CIS
for loop
 
Hi I have a problem with this loop, I don't know what is exactly wrong. Here it is: for (int=0;i<=phrase.size();++i) { cout<<"Character at posit...
[7 replies] Last: Ok!! I think I got it now... the condition should be < instead of <= b... (by CIS)
int 0 cast to a pointer =? null pointer?
 
Is a run-time integral value of 0, cast to a pointer, guaranteed to be a null pointer?
[8 replies] Last: ...really? (by Gaminic)
c++ game project
 
hello, im trying to make a simple 2d game and i have some questions, first how can i make that the person who plays the game doesnt hit enter, another question,...
[16 replies] Last: Really, beginner, you're doing things the hard way and making things m... (by Disch)
by Greeny
Build error: "const char * to int"
 
Hi all, I am an absolute newbie at C++, so be gentle ;) I have written this code: // TestInequalities.cpp #include <iostream> // Console input and ou...
[3 replies] Last: Wow thanks for the quick response guys, solved it! The book has a typ... (by Greeny)
64 x for loop
 
I am new to c++ and writing code so I was hoping that one of you may be able to help me with this exercise I am trying: The scenario is that there are 64 squ...
[13 replies] Last: Thanks for all your help no doubt I will be back again, ta (by spangle)
Help with homework
 
Hello all I know you will see my question and say its a simple fix but this is all new to me and I did some research but its not sinking in. The problem is: ...
[4 replies] Last: Oops... int main () { //.... length = getLength(); } doubl... (by Nisheeth)
by Greeny
VS2010 iostream not found
 
Hi guys, I am very new to C++, but not new to programming (have used VBA for a number of years) I have downloaded a copy of Microsoft Visual Studio 2010 E...
[2 replies] Last: Thanks for the reply. I tried re-installing and it seems to have fi... (by Greeny)
October 2011 Pages: 1... 5051525354... 59
  Archived months: [sep2011] [nov2011]

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