49,756 Topics

Member Avatar for
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
137
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
101
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
634
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
201
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
486
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
320
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
186
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
209
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
108
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
281
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
783
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
90
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
313
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
203
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
170
Member Avatar for SandraM

Hi! I´m newbie in C++ Code and JNI, so i have a big problem and i can´t found a solution. My question is: Is possible to call a Jni method in a normal ,method, so: I have in my c++ class, two method: void CVentanasDlg::OnButtonStart(){ printf("OnButtonStart"); } JNIEXPORT void JNICALL …

Member Avatar for SandraM
0
105
Member Avatar for MareoRaft

What happens when you set an int or double value to less than the minimum? I need my program to recognize when a number is smaller then the minimum, and then set the value to equal the minimum instead. This behavior is not the default... [CODE]#include <iostream> using namespace std; …

Member Avatar for mrnutty
0
134
Member Avatar for apanimesh061

I do not know how to compile a visual C++ project using makefile ! I am trying to build a boot loader using C++ and assembly. This is the list if the constituent files in the project: start.asm //this is the beginning bootMain.cpp //main function displayScreen.cpp //clears th screen buffer …

0
57
Member Avatar for RAIMI

hi i want to change the static table to a dynamic table using pointer what should i change in this case ? [CODE] #include <iostream> #include <fstream> #include <string> #include <math.h> using namespace std; int i ,j , l , k ,x ; float b; const int maxElements = 10000; …

Member Avatar for Narue
0
575
Member Avatar for RAIMI

I was trying to write a program . But when i run it i have this error message this application has requested the runtime to terminate it in an unusual way

Member Avatar for RAIMI
0
290
Member Avatar for vinothcv

write a program that can be used to assign and book seats for a commercial cinema. The cinema has 16 rows, with 20 seats in each row. The seats at the mid-column (number 5 to 15) of the last 2 rows closest to the doors (row A and B) are …

Member Avatar for Salem
-1
506
Member Avatar for salah_saleh

I was reading a book and i faced an issue here [CODE]39 template< typename NODETYPE > 40 void Tree< NODETYPE >::insertNode( const NODETYPE &value ) 41 { 42 insertNodeHelper( &rootPtr, value ); 43 } // end function insertNode 44 45 // utility function called by insertNode; receives a pointer 46 …

Member Avatar for salah_saleh
0
149

The End.