49,756 Topics

Member Avatar for
Member Avatar for jigglymig

I think I am comparing something incorrectly since it does take in my input and tells me no shortest path.. here is example input and output... 5 7 0 1 1 0 2 2 1 3 6 1 4 4 2 3 5 2 4 7 3 4 3 you …

Member Avatar for jigglymig
0
202
Member Avatar for MR_88

Hi guys, I'm trying to use the random number generator as part of the GSL library and it is working fine for a few hundred 'rounds' of my code (it is used quite a few times per round) but then i get an error message in the command window: [CODE]gsl: …

Member Avatar for zp0402
0
1K
Member Avatar for gethelpcpp123

I have to write a program that checks whether a sentence is a palindrome or not.I had no problem checking a word, but checking a sentence that contains spaces and quoatation marks made results incorrect. Basically to solve the problem and ignore the spaces and marks, I copied the initial …

Member Avatar for Labdabeta
0
218
Member Avatar for SAM2012

Hi All, I am working on a program where I want to keep the length of message in bytes to further working on it. the message got this string in it. [CODE] message^ m = gcnew message("usa.weather");[/CODE] I have to keep the length of this argument that is routing key …

Member Avatar for WaltP
0
175
Member Avatar for Tygawr

Hello, I want to learn how to make a syntax highlighter in vc++ 2010. What should I do?

Member Avatar for WaltP
0
61
Member Avatar for nekoleon64

This is embarrasing. My name is Leonard Norwood Jr. And I have problem concerning my program that does a simple program of multiplying a person's weight times the weight of the planet equals the weight they would be if they were on a planet. And this has to be done …

Member Avatar for HWalkmanWTN
0
173
Member Avatar for angrymasteryoda

Ok now i am having a retarded issue im sure. but here is what is supose to happen is n is not allowed to be more than 5 but when i run this and enter in 5 i get a blank space and when i enter 1-4 i get the …

Member Avatar for WaltP
0
141
Member Avatar for Tygawr

How can I read a string within a string without using substr? void ReadStrInStr() { string Str; Str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; //cout "A-J" in Str }

Member Avatar for WaltP
0
274
Member Avatar for gethelpcpp123

A password is good if it has at least one digit,one alphanumeric charecter, one uppercase letter, one ordinary lowercase letter letter and consists of 8 charecters or more. I created this program, but I'm not getting correct results.. What is the problem? void main() { cout<<"This program checks whether the …

Member Avatar for WaltP
0
108
Member Avatar for Labdabeta

I never knew that near and far were reserved until I made a struct for bounding boxes like this: struct boundingBox { float near, far; float left,right; float top,bottom; }; Does anybody know what near and far do, because I got the error that the declaration does not declare anything. …

Member Avatar for Labdabeta
0
120
Member Avatar for c3r3alki113r

# Source Code # robo.h - http://pastie.org/3698136 main.cpp - http://pastie.org/3698145 functions.cpp - http://pastie.org/3698148 # Glitches # When ever i try to create more than 2 instances of the class Robots the program will compile but crash it is crashing during construction right after the first while loop, i would think …

Member Avatar for c3r3alki113r
0
199
Member Avatar for jerryjerry

Hi all, I have implemented overloaded function for operator new. In this function I have not allocated any memory still while exiting from program it is getting crashed. Code is as below: class A { public: int a; int b; A() { cout<<"Inside A::A()"<<endl; } void* operator new(size_t s) { …

Member Avatar for L7Sqr
0
237
Member Avatar for beginneronce

Hey guys, i am a beginner in c++ and i don't know what's wrong with my code. i'dont get any errors, but when i run the programme the following: "... Line: 251 Expression: vector iterators incompatible ..." I think there is a problem with "b.getmark()" and "b.getcoursename()" but i don't …

Member Avatar for beginneronce
0
714
Member Avatar for RainbowMuffin

Hello, I'm fairly new to C++, and i would like to know how to make a program that uses IO stream? like, i want it to have settings feature where the user would enter thier info on a form, and it saves as a .txt or another format file, and …

Member Avatar for thines01
0
139
Member Avatar for mc3330418

I have a header file. #include <iostream> class coinReturn { public: coinReturn(); coinReturn(int quarters, int dimes, int nickels, int pennies); void setChange(int quarters, int dimes, int nickels, int pennies); void getChange(int& quarters, int& dimes, int& nickels, int& pennies); void print (); private: int countQuarters; int countDimes; int countNickels; int countPennies; …

Member Avatar for mc3330418
0
342
Member Avatar for praveenjain
Member Avatar for Lusiphur
-2
77
Member Avatar for TheFearful

Hey guys, I don't know where to get started in this. I pretty much only have the header file and I don't even know if that is correct. I don't know what the question is asking other than it is asking me to open up a text file. Any suggestions? …

Member Avatar for rubberman
0
156
Member Avatar for Tygawr
Member Avatar for pattmorter

Hey everyone. I just finished a cross product calculator program for the fun of it trying to test stuff outside of my rage of knowledge. I tried a couple new things like strings and cin.fail() so if someone would read over it and tell me what I did right/wrong that …

Member Avatar for pattmorter
0
285
Member Avatar for NachoLobato

I have to create a game, in which the computer chooses randomly a word out of 5 and randomizes its characters, so that the user has to guess the word. He can also get a hint of the computer. I have started the code, but dont know how to continue: …

Member Avatar for Ancient Dragon
0
218
Member Avatar for MrEARTHSHAcKER

Hi, I've been searching around about DLLs and I can't get what they actually are. Why do we need .cpp, .h and .dll file and how do we link it using CodeBlocks? I used tutorials to create DLL files, and it was successful, they contained 2 functions, but linking is …

Member Avatar for thines01
0
110
Member Avatar for nekoleon64

// Planet.h "Header file" #include <string> using namespace std; class Planet { public: // Constructors Planet(); // Post: your weight and the Planet's weight set to Earth. Planet(string); // Takes in string value and sets it to planet name, or defaults to earth if not valid float PlanetWt(float) const; //observer, …

0
204
Member Avatar for Sibuns

Hey! I have one problem with sorting matrix. So i want to sort the first row in matrix alphabetically and than copy all the values of other rows to matching char. Example: R E D b g s a v g a a sorting first row, and copy other char …

Member Avatar for Sibuns
0
137
Member Avatar for Labdabeta

I want to test some graphics work I am doing with the Utah Teapot model. The issue is that all the data I can find on it uses bezier patches (which I have no clue how to render) does anybody know how I could get the data in a form …

Member Avatar for Labdabeta
0
520
Member Avatar for phummon

Hi everyone, I’m Pete, moderately-experienced C++ user who is always looking for better ways to do things. Let me ask you guys about a problem I’ve scratching my head over lately. Suppose I’m writing a program designed to simulate a large company. I’m interested in tracking each company employee by …

Member Avatar for phummon
0
208
Member Avatar for Anthuny

I'm currently working on a project, trying to create a small game. When I run the program, it's supposed tp draw out the game characters, save them, then erase the screen and draw the next one. It works fine if I only getimage for one, but if I use malloc …

0
50
Member Avatar for needforkevin

hello! i have written a program to read in a text file and then ask the user to process the file with a different sorting method. so far i have been able to get my program to read in the file but my bubble sort seems to not be sorting …

Member Avatar for needforkevin
0
240
Member Avatar for sasho648

I've made some functions which can insert file inside a file but only with a small text files and they're very slowly. I will thank you if someone know a better way. Here are my functions: 1st struct Tree { char Symbol; Tree* next; } ; Tree* GetTreeHandler(unsigned long num) …

Member Avatar for sasho648
0
245
Member Avatar for khanthegamer

**Okay i have a problem that i am not able to sort out for couple of days now. I dont know why the code is not doing what it supposed to do. Basically I have written this code for a vending machine. Things i want in a vending machine ------------------------------------ …

Member Avatar for khanthegamer
0
151
Member Avatar for CGorelik

Hello, my name is Carol. I'm currently taking an introductory course in C++ and we just learned about functions. I was wondering about the standard accepted format for placing function definitions. For instance, in the following program, should I have defined the power function before the int main function instead …

Member Avatar for deceptikon
0
295

The End.