49,757 Topics

Member Avatar for
Member Avatar for MasterMic

First I'd like to say how much I appreciate these forums. They have helped me before, but this is the first time I've posted a question myself. My problem is that I use a different IDE than my teacher does (probably not the best idea) so I want the program …

Member Avatar for MasterMic
0
224
Member Avatar for bookmark

Why won't this output my string vertically? THanks in advanced, bookmark. [CODE]#include <iostream> #include <string> using namespace std; void print (const string & s); void main(){ print("blah"); system("pause"); } void print ( const string & s){ int i; int clrscr(); for(i=0;i<4;i++) { cout << "\n %c", s; } } v[/CODE]

Member Avatar for natha_peepli
0
100
Member Avatar for MasterGberry

I seem to be very bad with playing around with pointers. Basically the specialization template is supposed to return the address of the longest of the 5 strings provided. I keep getting an error on line 20 about char vs char *. Please some help, a good explanation on the …

Member Avatar for MasterGberry
0
100
Member Avatar for MasterGberry

I am having a similar issue [CODE]// Exc_3.cpp - Testing string with refernece #include <iostream> #include <cctype> #include <string> #include <cstring> using namespace std; string lowerToUpper(string & ref); int main() { string str; string constant = "q"; cout << "Enter a string (q to quit): "; //while (constant != getline(cin, …

Member Avatar for MasterGberry
0
130
Member Avatar for Vgwizardx

This is my first group project me and one other person wrote the majority of this program. I put message on the functions and other things i need help on. It seems to work a little bit but I'm not getting the correct values when I try to run this …

0
63
Member Avatar for lochnessmonster

i currently am throwing an exception in my constructor of my class and i read that when u do such a thing, the objects destructor is never called! meaning if i allocate any memory without using the heap, i have to MANUALLY deallocate the memory myself. An article i read …

Member Avatar for vijayan121
0
179
Member Avatar for shanker86

Hi all, I have a silly question regarding how to translate this command in CMakeLists.txt g++ x04.cc -o demo -lplplotcxxd x04.cc is c++ file , information about lplplotcxxd can be found here [url]http://ubuntuforums.org/showthread.php?p=8538977[/url] since the command " g++ x04.cc -o demo -lplplotcxxd" is working on my computer so I think …

Member Avatar for shanker86
0
169
Member Avatar for yznk

[CODE] #import <iostream> #import <string> #include <fstream> using namespace std; //The phonebook itself. class Book { public: int people; //The information for a person. class Person { public: string firstname, lastname, phonenumber; }; //Returns 1 if Person1 comes before Person2, 2 if Person2 comes before Person1, and -1 if they …

Member Avatar for geojia
0
329
Member Avatar for geojia

Hi, this is my first time posting and I would like thank everyone in advance. I'm doing a homework assignment that requires me to design a teller application which simulates a bank. I'm currently getting a segment fault, after I call one of my getBranch(). I've tried to do this …

Member Avatar for geojia
0
179
Member Avatar for imprezal2345

I've finished a void display function for an in-game menu. I'm trying to have the menu stay at the top of the cmd for the length of the game. However, since it's a separate function, the program stays in the menu function, and never reaches the functions that follow it. …

Member Avatar for imprezal2345
0
1K
Member Avatar for dvspinay

I have been tearing my hair out over this, and I have written and rewritten the code over and over again. If I can get some kind of direction or where to start, it would be awesome! I put something down there that I have tried for one of the …

Member Avatar for arkoenig
0
127
Member Avatar for makingafire

Hi all. I am having trouble with my code. I have played around with it for a while, and I just can't seem to get it. The only thing I am having trouble with is it getting to output the a.m. and the p.m. correctly. [B]it always outputs p.m. no …

Member Avatar for gerard4143
0
109
Member Avatar for borogirl09

I am working on a program that reads students name and test score from a file. The program should assign the appropriate letter grade, then output the name score, and grade. It should also determine the highest test score. I do not see where my errors are. Please help! [CODE]// …

Member Avatar for VernonDozier
0
151
Member Avatar for asa22

Hi All, I have a program with threads and after a while i ve got std::out_of_range error. when i broke the process to debug, it pointed me to this line: > testsimulatord.exe!mainCRTStartup() Line 182 C and my stack contents are: KernelBase.dll!7604b727() [Frames below may be incorrect and/or missing, no symbols …

0
33
Member Avatar for anthonys1mom

Hi. I am writing a program to read user input numbers until '0' is entered. I then figure out if each number is even or odd and find the average of all the evens and all the odds (even average is one number, odd average is another.) I have it …

Member Avatar for anthonys1mom
0
913
Member Avatar for 3drenderer

In the name of God . Hi everyone . I am going to write a program which compiles c++ codes . I don't have any time to write my own compiler . so i want to use ms compiler -> "cl.exe" I will use code below , but not working …

Member Avatar for nssltd
0
50
Member Avatar for aikiart

Hello, I've got a simple program where i'm trying to a Char array with a string, but even though the program in debug mode shows that the string Phone = Phone, it is not adding a new line when the string starts with Phone. Can anyone tell me why the …

Member Avatar for Ancient Dragon
0
160
Member Avatar for barevhayerable

Hello I have a > b(for example) I need to generate random number x that belongs from a to b for example a = 9, b = 16 x has to be x > 9 and x < 16 I use cstdlib.. but can't guess how to do it (using …

Member Avatar for arkoenig
0
340
Member Avatar for Nandomo

Ok I got my program running, finally ^.^ Compiling without errors But I want the looping for the binary search to work. How do I get it to loop without sending back a return until all 5 numbers are done searching. [CODE]#include <cstdlib> #include <iostream> #include <fstream> using namespace std; …

0
53
Member Avatar for rajunair

Hi..I m an engginering student in 3rd yr.I want make a minor software it mns want to do smthing diffrnt.pls give me an advice what should i do for dis.pls help me

Member Avatar for Narue
-1
48
Member Avatar for TSims11

Hi guys, I'm makeing a Homework "tracker", which is basically a day planner. I need help making a settings file for the initial setup. I have a text box, a couple radio buttons, and one "begin" button. I need a way for the program to remember what choices were seleced. …

Member Avatar for Ancient Dragon
0
106
Member Avatar for Azurit

This is part of my code. I want to declare an array of List, and I want to be able to pass this array to the functions listed below, so that I can do work on the array (i.e. add/delete nodes). But I have problems getting my head around pointers …

Member Avatar for Azurit
0
1K
Member Avatar for mphan228

I have to create the following functions with the code provided: OpenScreen(); MonthlyPayment(???); Amortize(???); AmortizeScreenHeader(???); But I'm kind of confused on whether or not the program will only have functions showing in the main body or will there be more than just the functions? Ex: [CODE]int main { OpenScreen() MonthlyPayment() …

Member Avatar for jonsca
0
379
Member Avatar for justinbailey

I have to answer with the runtime for Big O for a few examples of C++ code. I'm generally having some trouble grasping the concept of Big O but two particular problems are stumping me: [CODE]cin >> x; double n = example(x); for ( i =0; i << n; i++) …

Member Avatar for justinbailey
0
170
Member Avatar for awais1a

i have an assignment can somebody help me, [B] Assignment Statement:[/B] Comparing two arrays for equality or matching indexes You are required to write a program which will take input from user in two integer arrays. The program should compare both arrays for checking if both arrays are totally identical …

Member Avatar for VernonDozier
0
177
Member Avatar for lochnessmonster

say i execute an windows api function in my code to allocate memory in the specified process! How do i actually view/know this worked without checking getlasterror() or return codes? is there any other way i can do this in a easier/better manner? maybe runtime with a debugger? if so …

Member Avatar for Ancient Dragon
0
82
Member Avatar for yuugib

Hi again guys, last time I posted a problem I got a lot of help... and here I'm back again with new issue. This is the assignment: [QUOTE] Contains a function called sumN() which takes an int n as an argument and returns an int which is the sum of …

Member Avatar for penguins10
0
556
Member Avatar for Hayzam_#include

hi I wonder who is the smallest boy to know any low level programming language Eg:C++ or java etc exept the qbasic

Member Avatar for jonsca
-2
178
Member Avatar for sirko

I need to calculate the value of sin(sin...(sin(x))) for n times (n and the value of sin are input from the keyboard). That's is what I've came up with. #include "stdafx.h" #include <iostream> #include <math.h> using namespace std; double multipleSin(int n, double x); using namespace std; int _tmain(int argc, _TCHAR* …

Member Avatar for Bench
0
173
Member Avatar for terabyte

Hello I'm starting to learn c++ and I'm wondering if I should wait until c++0x standard is published (since I'm not in a hurry, currently learning Perl and Java) or should I start learning c++ with an old book I have If i do learn c++ w/ the 2003 standards …

Member Avatar for Bench
0
145

The End.