49,757 Topics
| |
I'm having trouble with the 3rd if statement of my code if(select == 3). Here, if the user selects '3', then they should be able to search for students (given that students have already been inputted), via their ID. The ID that is searched and the subsequent Name relating to … | |
I'm trying to make a function to insert a few integers into a sorted vector and display the integers in decreasing order. Actually is from my college tutorial question. Not that i don't want to ask my lecturer but i'm trying to learn myself how to solve the problem and … | |
Hi all, I'm doing a software. In this i want to develop my report engine in c++ using linux platform. Now my report engine should connect with my browser (Display engine). How i connect C++ with browser?? Example : in my report engine there 'll be class like below. Class … | |
I am using Visual C++ 2010 Express (that doesn't have MFC). Despite that, I have been able to create a Dialog box and populate the fields (and hopefully, soon, read back some data). I now want to use some radio buttons. To that end I have created two buttons with … | |
Hello, It seems like every time I start a new project with classes I have trouble with this. I am getting an error "undefined reference to 'Item::Item()' I'm sure I am overlooking a simple mistake. I have been looking at this for an hour and I cannot seem to find … | |
In my c++ class we are assigned to make a piglatin translator. I haven't had much experience with c++, but I've done quite a bit of programming in other languages. My main question would be what functions are available in c++ to handle strings and change them? I have a … | |
I have to use a function to reverse print a doubly linked list of 'items'. My teacher provided me with the implementation prototype to use, which looks like this [CODE]template <class itemType> void List<itemType>::reversePrint(ostream &output) const[/CODE] The only details he had written was "reversePrint is passed the stream to print … | |
Hello, what's the best way to sort a string to ints & chars. For example: "John Doe M 36" to John Doe (char[]) M (char) 36 (int) I researched about istreamstring sin(), but I'm not yet fully familiar with it, any tips. Thanks! | |
I thought I knew this but I don't. Currently I use RegCreateKeyEx to create a key, and then I call RegSetValueEx. Now what happens is that I create another key (folder in the regedit GUI), and I set the default value for that key (folder). But how do I add … | |
I've use to create this in Turboc++ 3.0 and there are four linker error how could i fix this? [CODE]#include<stdio.h> #include<graphics.h> #include<conio.h> main() { int gd=DETECT,gm,col=0; initgraph(&gd,&gm,"c:\tc\bgi"); while(!kbhit()) { setcolor(15); circle(col,100,50); col++; if(col>=600) col=0; cleardevice(); } }[/CODE] | |
I'm trying to store these arrays into the matrix [CODE]double X[5][3][/CODE] so I could classify them with 1 Nearest Neighbour: [CODE=C]double brick_v[3]={ent_brick,en_brick,con_brick}; double metal_v[3]={ent_metal,en_metal,con_metal}; double skin_v[3]={ent_skin,en_skin,con_skin}; double wood_v[3]={ent_wood,en_wood,con_wood}; double grass_v[3]={ent_grass,en_grass,con_grass};[/CODE] I would be very grateful if someone would show me how you can do this in C++. | |
Let's say I have a string with 1+5*9+4 etc.. whatever it may be. How do I use C++ do calculate this? I know recursive functions work here, but how? I figured I could loop ..searching for the * first ( higher precedence ) and then the +. No idea. Would … | |
In Windows, events are kernel objects. I am thinking that because of this, they should be accessible across processes, given each process has security access and the name of the handle. Another engineer argued with me that they are used only within processes...but I believe he is wrong. Anyone know … | |
Dear Friends I am wirting an application for drawing a rectangle on the screen using opengl and mfc. So I implemented the OnPaint function, OnDraw function is also giving the same problem. It's drawing fine. I want to implement pan, zoom, and rotate functionalities. Now everytime the mouse moves I … | |
Hi I come from Python background and learning C++. In one of my programs, I need to have one key with multiple values and both being strings. for e.g. [CODE] "str1" ---> "value of str1" "str2" ---> "value of str2" "str1" ---> "value of str1 1" "str1" ---> "value of … | |
Hello everyone. I am a new C++ learner and I have a question, is there only a constant C++ syntax in the world or there are many different types of C++? Because last month when I surf internet to see somebody made his own C++ program, I saw it his … | |
Assignment You are to write a program that will convert any base 10 number a to any base b. Input two values, the first in base 10 and the second value is the base that is to be converted into. Bases only between 2 and 9, and flag invalid input. … | |
I know that this is probably a stupid question :\ but I am stupid... I am getting [ICODE]1>angledCollision.obj : error LNK2001: unresolved external symbol "protected: static class angledCollision * Singleton<class angledCollision>::ms_Singleton" (?ms_Singleton@?$Singleton@VangledCollision@@@@1PAVangledCollision@@A) [/ICODE] [ICODE]1>spawningArea.obj : error LNK2001: unresolved external symbol "protected: static class angledCollision * Singleton<class angledCollision>::ms_Singleton" (?ms_Singleton@?$Singleton@VangledCollision@@@@1PAVangledCollision@@A) [/ICODE] I … | |
I promice everone that I have looked and looked and looked for a solution, I'm not just having a problem and being lazy putting it on daniweb... haha :) ull have to trust me, ive even googled it :O! Ok, so I am wondering, if I wanted to return a … | |
In writing a logger for an application, the datestamp ends up adding a new line. The datestamp function is as follows: [CODE]string log_class::get_time() { time_t rawtime; time (&rawtime); string timestamp; timestamp = (ctime (&rawtime)); return timestamp; } [/CODE] This outputs something like [ICODE]Tue Sep 6 14:58:35 2011[/ICODE], but when called … | |
Hopefully my last question for awhile, I wrote a piece of code like this before, but now I get the error: error C2064: term does not evaluate to a function taking 2 arguments Here is my code: [CODE]#pragma once namespace ValestromsCalculator { using namespace System; using namespace System::ComponentModel; using namespace … | |
I am having some issues with my project. This is homework and I am not looking for answers, just some help. I am to create a RationalNumber class that takes two rational numbers (fractions), reduces them, and I am then supposed to use overloaded operators to add, subtract, multiply, and … | |
Please help. I have an assignment for a class and I have been working on this for a week. Nearly all of it I finished in two days but I have been stuck with this problem for 5 days now. I am using MS VC++. I am having quite a … | |
I am an absolute newbie to C++. I have an ATM program problem where I need to keep a running total of transactions and the balance of the checking account. I cannot think of how to set an accumulator for the transactions or how to keep a running total of … | |
hey guys so I'm studying a unit called Object Oriented Analysis its not one of my strongest units so i need some help in the concept of understanding UML and i have a exam coming up and i was if you guys could help me understand the basic concepts here … | |
Hello, does anyone know how to unwrap an Object? for example z and y are of type Element and 5 is a primitive double. I can write an operator+ function to add the two object together ie (z+y) but I don't knw what to do to add 5+z, Z is … | |
So I want to make a text-based game that has different maps, displayed in ASCII art-style. I've been tinkering with fstream, and I wrote up this code: [CODE]#include <iostream> using namespace std; #include <fstream> int main() { ifstream indata; int i; int j; int k; char grid[9][9]; char letter; indata.open("grid.txt"); … | |
Hi, I found a problem with operator overloading. Consider following class: [CODE]class Number { public: int value; int operator +(int v) { return value + v; } }; Number n; n.value = 5; [/CODE] Now, n+5 successfuly returns 10, but 5+n gives error [QUOTE]error C2677: binary '+' : no global … | |
Hi there, right now my teacher wants me to make an outline of a half-diamond with numbers, using for loops, kind of like the following: [code] 1 2 3 4 5 4 3 2 1[/code] The number 5 is a user input, so the half-diamond's width would be controlled by … | |
Pretty sure this would be the right area to post this, I recently started to make this program in Visual c++ 2010, and Before I added the GCF.h form, I had no errors at all. Now I get all these 1>------ Build started: Project: Valestroms Calculator, Configuration: Debug Win32 ------ … |
The End.