49,761 Topics

Member Avatar for
Member Avatar for Chona Ramos

using c++ program,enter students record and perform the following activity: save search delete view edit print

Member Avatar for WaltP
0
163
Member Avatar for mike_2000_17

[B]Beginner's Guide to C++0x: The Big Five - Implementing a Resource-holding RAII Class[/B] This tutorial will show how to implement a [I]resource-holding class[/I] showing practical use of [I]C++0x features[/I]. A resource-holding class is any class which holds, with its data members, a resource which could include: [LIST] [*]dynamically allocated memory …

17
2K
Member Avatar for Sonia11

Hey guys, I want to know one thing, for instance I am having a character array like this: [@@123124123123125@@@] where 123, 124 and 125 are one three-digit numbers and are NOT separate like 1,2 and 3. I want to know the number of times 123, 124 and 125 have occurred. …

Member Avatar for TrustyTony
0
120
Member Avatar for thecoolman5

hi, i am just wondering how to open a picture of a normal format. I know that you cant do it in the console. And i am using the compiler DEV-C++. Thanks

Member Avatar for mike_2000_17
0
325
Member Avatar for triumphost

Not sure why this moderator or admin or whatever deleted my previous thread because it wasn't anything malicious.. My problem is that getfileattribute doesn't work for me.. and my code below is just a snippet of my entire program which is below that.. Dear Mod: I think you deleted it …

Member Avatar for Ancient Dragon
0
548
Member Avatar for bratok

Hi All, I have a simple question, I hope. Here's the overview of the problem: "There is a board game with 9 squares on it (three rows of 3 squares). Each square has a coin on it. The coins can be either heads or tails side up. You can only …

Member Avatar for bratok
0
242
Member Avatar for tiredoy

Well, I define a function gotoxy(). [CODE]void gotoxy(int x, int y) //定位到第y行的第x列 { HANDLE hOutput; COORD loc; loc.X = x; loc.Y=y; hOutput = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorPosition(hOutput, loc); return; }[/CODE] However,whenever I use it.There is a flashing cursor which is ugly to see. I want to get rid of it.But I don't …

Member Avatar for tiredoy
0
229
Member Avatar for triumphost

A couple questions I have for anyone that knows WINAPI as Im trying to learn it right now.. I usually program in .Net Managed and the basic console stuff. [B]First:[/B] Is there a designer for WinAPI like there is in Visual Studio Form App Editor? Or is it just outright …

Member Avatar for caut_baia
0
136
Member Avatar for MareoRaft

What is the easiest way to check if a vector is empty? [CODE]#include <iostream> #include <vector> using namespace std; typedef std::vector<double> Vec; typedef std::vector<Vec> Mat; int main(){ Vec v; // this is what i consider to be an "empty" v if( /*check if v is empty here*/ ) cout<< "v …

Member Avatar for NathanOliver
0
138
Member Avatar for awah mohamad

hi guys i am planning to create a website for my school(i am a high school student) that saves the students marks and then gives too many out puts. i am doing it for the science fair after 2 months. that is not my problem, my problem is i need …

Member Avatar for Ancient Dragon
0
102
Member Avatar for angelsakura

Hi, we have this school activity that is rush for tonight. I would really appreciate if somebody will help me. It would really mean a lot to me. So here is the problem that were tasked to us to create a C++ program. Problem: Write a C++ program to perform …

Member Avatar for WaltP
0
2K
Member Avatar for babis87

Hello! I am making a program which does many computations for a Photovoltaic system. The problem is that i get a strange segmentation fault error when I run the program. Here is where it crushes (at for-loop of calculation S5) : [CODE] commands..... ... ... /******************** WIRING *******************************/ Ni = …

Member Avatar for Salem
0
2K
Member Avatar for ahmed30

hello i just have started learning c++ but i have a big problem at sources .. i want to make something is unsigned then i have to change it from int3t_t to unit64_t but when i change it at player.h it says it must be changed at creature.cpp and alot …

Member Avatar for ahmed30
0
117
Member Avatar for confused!

Hello. I am trying to write a program where a human can play rock, paper, scissors with the computer. I'm stuck on the "determine computers choice" part......Here's my code so far... [code=cpp] #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main () { // initialize the computer's random …

Member Avatar for wizzard_tzie
0
648
Member Avatar for bimoweemo

this is a piece of my header file that is a template and my implementtion file that is using it.I keep getting errors and dont know why,any help would be appreciated. [CODE]template<class T> class List { public: private: T *list; int size; int numElements; bool isValid(int location) const; }; [/CODE] …

Member Avatar for mike_2000_17
0
202
Member Avatar for sadsdw

Hi there, I need to read a file with unknown number of columns and lines. Basically, I have an ID per line (ID00005) and many columns containing 2 letters. The format is: ID00005 RR WW SS QQ TT RR UU II ID00008 WW SS QQ YY HH JJ KK LL …

Member Avatar for sadsdw
0
498
Member Avatar for oltokom

I recently started visual studio 2010.After searching in google I was able to create a .cpp program. everything is fine; I can build it and run it without getting errors.But everywhere in the internet I see when they run the program they can see a black command prompt window which …

Member Avatar for oltokom
0
321
Member Avatar for MareoRaft

This function is returning the error "matrixOpsLibrary.h:11: error: invalid initialization of reference of type ‘const std::Vec&’ from expression of type ‘const double’" [CODE]#include <vector> #include <cmath> using namespace std; typedef std::vector<double> Vec; //Vector Vec floor( const Vec& y ){ unsigned n = y.size(); Vec bottom(n); for( unsigned e=0; e<n; ++e …

Member Avatar for MareoRaft
0
187
Member Avatar for jepapel

I was wondering if there is a library or smt that can allow a programmer to use other foreign languages in C++. For instance i want my c++ program to display some Greek messages that i will define, but instead i get some garbage. Is there anyway to call unicodes …

Member Avatar for Plato_1981
0
3K
Member Avatar for mrnobody

Hi, How do I correctly call a function which expect BSTR* as a parameter? eg: [CODE]void FunctionA(BSTR* b) { // Do something }[/CODE] Currently, my code is as follow: [CODE]void Caller() { BSTR* pbstr; FunctionA(pbstr); }[/CODE] However, during compilation, I get warning "local variable pbstr' used without having been initialized". …

Member Avatar for Ancient Dragon
0
210
Member Avatar for RAIMI

hi i compile this code but it works but i have as result the error message "Memory is insufficient! " [CODE] #include <iostream> #include <iomanip> #include <fstream> #include <string> #include <math.h> #include <nurbsS.h> #include <nurbsSub.h> using namespace std; int i ,j , l , k ,x,y ; float b; const …

Member Avatar for RAIMI
0
110
Member Avatar for loumbut

I wrote the following code to create a wav file which generates varying frequencies based on the Hebrew Gematria pattern. It compiles great but does not write the wav file. What am I not understanding about this code? [CODE] #include <iostream> #include <math.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include …

Member Avatar for ivanx_wu
0
2K
Member Avatar for kumarmpk4u

Hi All, When my code tries to free the memory allocated by the new operator it throws a debug error while using the delete operator... [CODE] CDocum* pDocum = new CDocum(); int nResult = pDocum -> QuoteDocProd(); delete pDocum; [/CODE] Error Am getting is Debug Error! Damage after Normal Block(#298753) …

Member Avatar for kumarmpk4u
0
284
Member Avatar for RAIMI

Hi! I try to compile this code [CODE] while( file >> word) { word.size(); T[i]= new string[word.size()]; *(T[i])= word; i=i+1; } for (j=0;j<i;j++) { Bt[j] = new float [100]; *Bt[j] = *atof(*(T[j]).c_str()); } [/CODE] but i have this problem [CODE] error C2228: left of '.c_str' must have class/struct/union [/CODE] where …

Member Avatar for RAIMI
0
794
Member Avatar for anoopvadi

hi, am a novice in programming. i am facing some difficulty in C++ programming, actually i want to read a column of numbers from a text file or an excel sheet and store that in an array so that i can use it for further processing.Plz help me to solve …

Member Avatar for tikoti
0
3K
Member Avatar for kalingaRHASTA
Member Avatar for L0s3r

Code 1: [code]#include<iostream> using namespace std; int& func() { int a=6; return a; } int main(void) { int a = func(); cout<<a; cin.get(); return 0; } [/code] According to my thought , first of all func() will create a temporary reference to a (as it is returning by reference) , …

Member Avatar for arkoenig
0
91
Member Avatar for L3gacy

Hello everyone, I have a small question about the code below, I understand just about every part of it. Except for this small snippet, could someone explain how the loop works? [CODE] while(begin != end ) //<-- I believe the stream iterator is getting input here words[*begin++]++; // <-- I …

Member Avatar for mrnutty
0
315
Member Avatar for bimoweemo

I keep getting errors and i dont know what im doing wrong.I've included just pieces of these three files. The compiler is giving me errors and i dont know what's wrong. this is my header file List.h not all but some of it. [CODE]#include <iostream> using namespace std; #ifndef INTEGERLIST_H …

Member Avatar for NathanOliver
0
204
Member Avatar for xxlt3xx

Hi, I'm stuck... I'm writing a program that creates a data file then populates the file with 500 random integers both positive and negative. The problem I'm having is reading the integers from the file and storing them into three arrays for processing neg[],posEven[],and posOdd[]. I really just need a …

Member Avatar for xxlt3xx
0
171

The End.