49,761 Topics

Member Avatar for
Member Avatar for serkan sendur

is there any vay to access iterator's index value without using another variable in the for loop?

Member Avatar for guest7
0
178
Member Avatar for zendet

lets say i had this int times cout<<"enter times you want to repeat"; cin>>times; ----> cout<<"Hello what age are you?"; cin>>age; <------- how would i get it to repeat this section of codes the same amount as the user inputs? but make it that if he input repeat by 5 …

Member Avatar for zendet
0
96
Member Avatar for joshjgordon

This is my first post here, but I have been using the forum for many months and up untill now has been able to answer all my problems without me actually asking anything. So thanks in advance for all the great work you guys do, you have been fantastic in …

Member Avatar for JasonHippy
0
141
Member Avatar for kent01981

Hi, I am trying to let a string(a sentance) to be red into mysql.but I only can do it within one word, how can I do more? this is my code: //---------------------------------- sql::Driver *driver; sql::Connection *con; sql::Statement *stmt; sql::ResultSet *res; driver = get_driver_instance(); con = driver->connect("localhost", "root", "qwerty"); con->setSchema("menagerie"); stmt …

0
58
Member Avatar for guest7

Hi, I am trying to read he has map starting from the second key instead of first key. I have two loops. One for loop iterator reads from the beginning of the has map. And the second for loop is trying to read from the second key of hash map. …

0
68
Member Avatar for Phil++

Hey there, please could you tell me if the CRC cards that I've created for my classes are alright please? There are 4 classes: Employee Manager Game Platform Manager inherits from Employee Game assocates with Platform Employee + Game are super classes Thanks :) P.S please find document attactched.

0
47
Member Avatar for zendet

Hello, im doing a project and need some help. my project is have to make a program for 5 judges. at the start the first thing asked is how many competitors are there. then it asks the first judge what hes gives for the first competitior, then what the second …

Member Avatar for dkalita
0
78
Member Avatar for LisaJane

I have this program that is supposed to read part numbers from a text file. 101-110, 301-310, 501-510 and put them into a hash table. It will prompt for one of four algorithms to be used and then continue to load the part numbers. Everything seems to be working okay, …

Member Avatar for xaveri
0
5K
Member Avatar for Kennych

Hey can anyone tell me whats wrong with my code? I'm getting a program freeze. [url]http://i47.tinypic.com/wh1ez5.png[/url] I'm doing a binary search tree, BST.CPP [url]http://pastebin.org/57667[/url] Person.CPP [url]http://pastebin.org/57669[/url] TreeNode.CPP [url]http://pastebin.org/57670[/url] Main---Where I call the searchTreeInsert function [url]http://pastebin.org/57674[/url]

Member Avatar for programmersbook
-1
147
Member Avatar for reza.adinata

Hallo all, I have a question for implementing Inheritance in C++. I think I miss the concept of inheritance C++ somehow, because the second class can not take the parameter from the first class.. I need to use a class Carbol and Carbol2. In Carbol2, I need to add a …

Member Avatar for programmersbook
0
120
Member Avatar for foxmulder

Hi! I am doing a C++-program which I have to use functions. The program is the following: Write a function that calculates the fuelconsumption, it takes two numbers, litres and kilometers, and gives the consumption in litre per 100 km. The functions must write on screen in main. Here is …

Member Avatar for Seten
0
137
Member Avatar for Valaraukar

Hi, I have created a generic linked list in which different objects can be added to a list as long as they inherit from my object class. My problem is this: I am able to add nodes and find nodes etc. but I can't figure out how to return an …

Member Avatar for GrubSchumi
0
131
Member Avatar for Darth Vader

I think I am missing out some logic when it comes to the backgroundworker. For this scenario. I am using a loop in the backgroundworker. Each loop I am calling an event that is writing values to a file. After writing these values, I am increasing updateValue. The problem is …

0
81
Member Avatar for Darth Vader

Hi, I wonder what the way is to remove dublettes from a List. ? I have filled a List like this: [code] List<String^>^ List1 = gcnew List<String^>(); List1->Add("123"); List1->Add("124"); List1->Add("123"); [/code]

Member Avatar for Darth Vader
0
121
Member Avatar for luskbo

Ok. I've been working on a pacman game using C++, and OGRE. Things have been going good, but I have run across a problem with the collision detection of pacman hitting the walls. Before I explaing, here is some of the source code. PacpersonObj Class Header [CODE] // PacPersonObj.h // …

0
71
Member Avatar for guest7

Hi, I have a 2 dimensional vector containing entries such as : 10X 01X 001 I merge two rows at a time and get a new row of elements. In other words, when i combine "10X" and "01X" i might get "001" but since "001" is already there i do …

Member Avatar for programmersbook
0
83
Member Avatar for "Alex"

For example Im trying to make the user input his name, last name, and salary and then make it display " First Name is" followed by what they put in as their first name "Last Name is" followed by what he put as his last name... and now im getting …

Member Avatar for Narue
0
132
Member Avatar for PDB1982

I have to creat a program where the user inputs two large ints, and they are converted into string in order to add them together (assuming they are larger than 20 characters). One thing, is that it tells me to convert the numbers to a string and store it in …

Member Avatar for mrnutty
0
98
Member Avatar for didijc

Hey everyone, Happy Thanksgiving first and foremost... Second, I am attempting to build my own HTML Parser in C++ but I have no idea where to start... I've looked at some of the examples and libraries out there on the web, but none of them really helped... If someone could …

Member Avatar for didijc
0
524
Member Avatar for sabian4k

[code] void triangle(ostream &outs, unsigned int m, unsigned int n) { if ( m <= n) { int NumberOfLines = (2 * (( n - m) + 1)); int Mid = (NumberOfLines / 2); for (int i = 0; i < NumberOfLines; i++) { if (i < Mid) { for …

Member Avatar for DaBunBun
0
168
Member Avatar for sfuo

Does anyone know of any good OpenGL selection tutorials that go over how to process more than 64 objects? The only tutorials that I can find deal with under 64 objects and when they mention more than that they say use a loop but don't go into any detail. Thanks

Member Avatar for mrnutty
0
93
Member Avatar for HROFE

hi, i need to create function that mesaure time in micro second . how can i do it??? hezi

Member Avatar for HROFE
0
39
Member Avatar for jacline

Hi everyone, I write a project about a banking system . In homework professor told us that "Your code must not have any memory leaks. You will lose points if you have memory leaks in your program even though the outputs of the operations are correct." How can I check …

Member Avatar for jacline
0
103
Member Avatar for chunalt787

I need to check if a named pipe is empty. I am cycling through about 10 of them and if its empty I don't want to block until there is something in it I just want to move on to the next one. Is there any way to check if …

0
93
Member Avatar for foxmulder

Hi everybody! I dont want to lie and say this isn't an assignment because it is, and I have really got stuck here. The assignment was to create a lottery-program which randomly displays 10 ordinary numbers and 5 extra numbers, all in between the interval of 1-50. The problem is …

Member Avatar for foxmulder
1
98
Member Avatar for Jamesinuk

Hello, i really need help on this. I fully cannot understand what i am doing wrong here. This is a segment of my project that uses dynamic arrays but i seem to be getting random memory related crashes that i cannot seem to fix. These are my encode/decode classes. They …

Member Avatar for Jamesinuk
0
91
Member Avatar for misvampire

i need to add virtual function to my coding. somebody please help. whre should i put it heres the code. [U]figure.h[/U][CODE] //This is the header file figure.h. using std::cout; class figure { public: virtual void center(); void draw(); void erase(); }; void figure::center() { cout << "Centering the Figure"; cout …

Member Avatar for mrnutty
0
120
Member Avatar for cousinoer5

This program has been bugging me a lot to get working, so far I've had to fight through tons of errors Hydra style (every one I got rid of, 2 took its place). Then I finally got an error free compile, but the txt file where the answers should be …

Member Avatar for cousinoer5
0
176
Member Avatar for fjrivash

Hi *, I have a file like this : [CODE]Example : 10 2 0 1 234.5677 0 2 345.6786 0 3 678.6764 .... [/CODE] From the first line the first number is number of lines and the second one is the number of nodes, so the thing is I need …

Member Avatar for fjrivash
0
84
Member Avatar for wmsigler

My heapsort is not functioning the way it should, and I was wondering if perhaps one of you could help point me in the right direction. Much thanks in advance should you care to look! :) If it helps anyone, I posted it on pastebin.org with syntax highlighting: [url=http://www.pastebin.org/55997]http://www.pastebin.org/55997[/url] Source …

Member Avatar for wmsigler
1
164

The End.