49,761 Topics

Member Avatar for
Member Avatar for DoctorBob

So I have 4 different algorithms to sort numbers that me and my best friends wrote to see who's worked the best. They are not the greatest ..since we aren't the greatest programmers..haha but we thought it'd be fun. I thought I'd let you guys take a look at them …

Member Avatar for DoctorBob
0
114
Member Avatar for SpiderKing

Im kinda new to programming, so my question is a simple one. I have came across term of data structures, and have been toying with some basic exsamples of them. While [CODE]int *pointer [10]; struct cell{ int death; }; int main () { cell test; cell * pointer[0]; pointer[0] = …

Member Avatar for SpiderKing
0
78
Member Avatar for jrice528

In the retailitem.cpp I need to beable to increment x,y and z. So that is displays the next item. Heres what the code should output [code] Descriptio Units On Hand Unit Price ($) Item #1 Jacket 12 59.95 Item #2 Jeans 40 34.95 Item #3 Shirt 20 24.95 [/code] Heres …

Member Avatar for Narue
0
102
Member Avatar for cmoodc

hi I have a practical exam after 1 hour and i dont know how can i write a 3D rotate function 3D scale 3D translate i need it in general form our teacher has a weak knowledge about his subject plz anyone can help me

Member Avatar for invisal
0
91
Member Avatar for eranga262154

Hi all, I want to store some data pairs. A variable name and the value. I've try it in this way. [CODE] //data map testing map<string, int> my_map;//map map<string, int>::iterator my_it;//map iterator my_map["first"]=10; my_map["second"]=12; string ss = "third"; my_it = my_map.find(ss); if(my_it == my_map.end()) { //insert new value my_map["third"] = …

Member Avatar for Narue
0
89
Member Avatar for kv79

Hi to all, When i was reading the Win32 turtorial. A message is an integer value. If you look up in your header files (which is good and common practice when investigating the workings of API's) you can find things like: [code=Dev-C++] #define WM_INITDIALOG 0x0110 #define WM_COMMAND 0x0111 #define WM_LBUTTONDOWN …

Member Avatar for kv79
0
116
Member Avatar for Jakiro

hi all. I have a question need your all help. 1.what is the problem for my delete function,I can't delete the list that i select(but no error in that case) 2.how to build the search function with that prototype? [code=cplusplus] #include <iostream> #include <string> #include <cstdlib> using namespace std; struct …

Member Avatar for Duoas
0
87
Member Avatar for zandiago

Good day to all of you who assisted me. I never thought I'd pass this class, but with all your help, I made it. This is the only C++ course that I needed...so I really wont have any c++ questions to post around here to bug anyone...but i'll still hang …

Member Avatar for zandiago
2
92
Member Avatar for maHvic

can you please help me how to make this program?? please... For VRC (Should all be contained in functions/methods/class) - Inputs > Message to be transmitted / Received Message should be captured in an Array (limited to letters, numbers and punctuations, as to: period, comma, exclamation point and question mark) …

Member Avatar for Salem
0
99
Member Avatar for gidos

im studying about Database with C++ support, i create a workspace for mfc dialog box, name of workspace is ABC. the source files of C++ is on C:\VCDb. I create on ODBC the System DSN name ab, the driver of this is Microsoft Access Driver. On abc workspace i #include …

0
56
Member Avatar for Ejl191

I'm trying to get my program to read from a text file, but the only way I'm able to get it accurate at the moment is to set the first loop to the number of lines of data that I have. I'm looking for a way to set it so …

Member Avatar for Ejl191
0
93
Member Avatar for jaepi

Hello there, do have any idea if there is a function that gets wchar from the stream, somewhat similar to fgets function. Thanks. :)

Member Avatar for jaepi
0
146
Member Avatar for jaepi

Hello there, is there a function in Linux that can handle the reading of an .ini file? Thanks.

Member Avatar for jaepi
0
1K
Member Avatar for qcwailun

I want to write a code for recording inventory item, all the functions work fine except the function for removing the data. I spend a lot of time in it but still cannot know what's wrong. Here is my code: [code=c++] #include <iostream> #include <fstream> #include <vector> #include <string> using …

Member Avatar for Ancient Dragon
0
274
Member Avatar for kaly12

This is a part of a c++ program: cout<< "Width:" << Width << "\n"; cout << "Length: " << Length << endl; what does the "\n" do in oppose to endl; ? also, when do you use void main instead of int main at the beginning of the program?

Member Avatar for invisal
0
90
Member Avatar for spankyg

Can someone please explain to me just exactly this try/catch is doing? It doesn't seem to make any sense to me. Thank you in advance. case '\r': if (Choice==(CancelIndex+1))return; try{(*Action[Choice-1])();} catch(...){} system("cls"); Choice = 1; break; case char(27): if ((CancelIndex+1)==ItemCount)return; try{(*Action[ItemCount-1])();} catch(...){} Choice = 1; break;

Member Avatar for spankyg
0
122
Member Avatar for Kattalyst

A College offers a course that prepares students for the state licensing exam for real estate brokers. Last Year, several of the students who completed this course took the licensing examination. Naturally, the college wants to know how well its students did on the exam. You have been asked to …

Member Avatar for Kattalyst
0
91
Member Avatar for guitarrick

I posted this one earlier, but no go......I'm getting an error for the constructor definition StudentRecord::StudentRecord() that it cannot return a value. This was running until I did some rearranging to try to get my function that calculates the total grade average in main to work.(So i commented that all …

Member Avatar for guitarrick
0
90
Member Avatar for r5ingh

Hello. I, the C++ noob is back again... This time requiring some help with some visual CPP. This is the first time im working with this, and its only @ a basic level. Yes, this is somehting im doing at university, but i dont ask for help unless im stuck …

Member Avatar for r5ingh
0
231
Member Avatar for volia

Hi guys, I'm new the site, in fact just stumbled on it looking for some help with some C++ strings. I'm taking 1400CS and well, to be perfectly frank, I'm not good at it. This is alright, I'm more of a VT person myself, but I have this and another …

Member Avatar for Narue
0
69
Member Avatar for comput_novice

i have a task how to link two files to read from oneanother like a search this is what i have please help this is urgently needed ofstream outfile; fstream myfile; outfile.open("Inventory.txt"); myfile.open("Invoice.txt"); outfile<< "\n\nWELCOME TO THE INVENTORY\n"; outfile<< "========================\n"; outfile<<"Item ID"<<setw(10)<<"Name"<<setw(16)<<"Descrition"; cout<<"Please fill in the following information\n\n"; cout<<"Item ID: …

Member Avatar for Salem
0
98
Member Avatar for kv79

Hi to all ,just a small question. When i read in the book for Win32 API tur. in c++, this: " cbSize The size of the structure. " I asked my self ,what sturcture? I tought we useing class.

Member Avatar for kv79
0
114
Member Avatar for __vmware__

Hello, I have problem witch i've been working on for a couple of days now with no real progress. The problem is that i'm trying to search trough a array of pointer for a certain value. If the value exist return that value to be used in another function, but …

Member Avatar for __vmware__
1
102
Member Avatar for eranga262154

Hi all, I have a string(not a CString), actually a file path. As an example, [CODE]c:\Test\MyProject\G00062_002_01.srf[/CODE] Then in following way get some data. [CODE] string FullPath = c:\Test\MyProject\G00062_002_01.srf string filePath = FullPath.GetFileTitle(); string groupID; string sessionId; string partID; groupID = filePath.substr(1, 5); sessionId = filePath.substr(7, 3); partID = filePath.substr(11, 2); …

Member Avatar for Duoas
0
113
Member Avatar for danbellinger1

I am working on a project using 2D arrays ( I have never really understood the use, I know how they work, just have always had problems implementing) that holds a 4x4 "magic square." Magic squares contain unique numbers whose rows, columns, and major diagonals add up to the magical …

Member Avatar for Lerner
0
167
Member Avatar for 3nCrypti0n

Im making this program. But im having trouble calling certain functions. Im having trouble calling ShellExecute, RemoveDirectory, CreateDirectory, FindFirstFile, & DeleteFile. I get the following errors when trying to compile... [CODE] c:\documents and settings\george\my documents\visual studio 2005\projects\mmpc v1.0\mmpc v1.0\prog.cpp(42) : error C2664: 'ShellExecuteW' : cannot convert parameter 2 from 'const …

Member Avatar for Duoas
0
223
Member Avatar for alcoheca

Hi, Despite triple checking my code for duplication and checking that the headers include #ifndef I still can't trace what is causing this error message: drawscr.o(.bss+0x0):drawscr.cpp: multiple definition of `massage' main.o(.bss+0x0):main.cpp: first defined here Ideally I'd create the pointer at struct definition time via a declarator. [CODE=C]// drawscr.cpp #include <iostream> …

Member Avatar for Duoas
0
284
Member Avatar for guitarrick

Hello again everyone. This one is a project to help with understanding another project (aren't they all?)... At any rate, this was running up through main where I was attempting to call and get my grade computation function (which you'll see a bunch of stuff commented out). I fooled around …

Member Avatar for guitarrick
0
112
Member Avatar for finalheavenx

help me make this shorter.. i think this is too long.. i'm a newbie student.. #include <iostream.h> #include <conio.h> int main() { int x, n=0; clrscr(); for(x=1;x<=5;x++) cout << " " << x; if(++n==5) { cout << " " << endl; } n=0; for(x=2;x<=5;x++) cout << " " << x; …

Member Avatar for WaltP
0
119
Member Avatar for kittycat07us

Hi. I was wondering if someone could help me with this program.. the purpose of this program is to play tic tac toe, and I'm having difficulty getting it to compile. I have gone through it several times. I would most appericate it if anyone could look at it and …

Member Avatar for Ancient Dragon
0
88

The End.