49,761 Topics

Member Avatar for
Member Avatar for Alexkid

Hi there, I have an array of unsigned chars SOURCE, i need to combine into DESTINATION, i want to turn: SOURCE[0] = 3 SOURCE[1] = 9 SOURCE[2] = ' ' SOURCE[3] = 0 SOURCE[4] = 4 SOURCE[5] = ' ' SOURCE[6] = 7 SOURCE[7] = d into DESTINATION[0] = 39 …

Member Avatar for deceptikon
0
4K
Member Avatar for tomz6

I'm using Visual C++ express 2010. Whats wrong with this code: (A video tutorial uses this code and works fine on theirs) #include <iostream> using namespace std; int main(){ string myString = "hello"; cout << myString << endl; return 0; } ??? Says: error C2679: binary '<<' : no operator …

Member Avatar for mike_2000_17
0
3K
Member Avatar for prahesh

#include<iostream> #include<string> #include<vector> #include<set> #include<map> using namespace std; struct PoiDetails { int x; std::string s; }; int main() { struct PoiDetails oBj; std::map<std::string, PoiDetails> vName; oBj.x = 1; oBj.s = "str1"; vName["Jhon"] = oBj; oBj.x = 2; oBj.s = "str2"; vName["Ben F"] = oBj; oBj.x = 3; oBj.s = "str3"; …

Member Avatar for NathanOliver
0
196
Member Avatar for Zaina jee

When I write program in Visual Studio 2010, then error comes that "cannot find or open PDB file". Is their any solution of this problem?

Member Avatar for Ancient Dragon
0
90
Member Avatar for zindgi66

#include <cstdlib> #include <iostream> #include <graphics.h> int main() { initwindow(1366, 768, "Prim's Algorithm"); int midx,midy; // /**************Node 0 creation***************/ midx = (getmaxx()/12); midy = (getmaxy()/12); rectangle(midx + 30,midy-10,midx - 30,midy+10); midx = (getmaxx()/12)-1; midy = (getmaxy()/12)-8 ; // setcolor(10); outtextxy(midx, midy,"0"); /*******************Right Vertex******************/ setcolor(15); midx = (getmaxx()/12) + 30; midy …

Member Avatar for zindgi66
0
187
Member Avatar for panatda.tokhume

<html> <head> <title>Nutrient</title> </head> <body> <? $filName = "resource.txt"; $objWrite = fopen($filName, "w"); $objConnect = mysql_connect("localhost","u52030177","guillaume") or die("Error Connect to Database"); $objDB = mysql_select_db("u52030177"); $strSQL = "SELECT * FROM Nutrient"; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); //$link = mysql_connect("localhost","u52030623","u52030623"); //mysql_select_db("u52030623"); mysql_query("SET NAMES UTF8"); //$sql = mysql_query("select * from …

Member Avatar for panatda.tokhume
0
257
Member Avatar for sumair khaliq

hi,i am new to programming and i got an assignment which is very difficult,i hope anybody can help me here !! You have to make a racing game in C++. There are two players in your program. They play by throwing 3 dices and then moving forward. Your program should …

Member Avatar for Lucaci Andrew
0
138
Member Avatar for arnabjonty

pls help me...i wnt to know how to delete a word from a string...cant make it out..pls help...

Member Avatar for Lucaci Andrew
0
153
Member Avatar for christinetom

Hi again everyone. A really newby question coming up because I just don't know how to put this. If I want some software which can be compiled as part of my application / project etc, something which has little or no reliance on external programs (all packed in as part …

Member Avatar for christinetom
0
87
Member Avatar for ziadkassam

Hello all... I want the multiplication of the same matrix but in third, forth, fifth... degree. I have made the C++ program and this is the code: #include <stdio.h> #include <stdlib.h> #include <iostream> using namespace std; #define WIDTH 3 #define HEIGHT 3 void main(){ int a[HEIGHT][WIDTH]; int b[HEIGHT][WIDTH]; int n; …

Member Avatar for ziadkassam
0
421
Member Avatar for dumbncool

Hi All, I need your guidance for a project (using Visual Studio + MFC) I'm doing. I want to create page flipping animation of a book. There should be a book and when I click on a key then the next page should be displayed. You get the idea? Similar …

Member Avatar for anuj.juthani
0
801
Member Avatar for anukavi

Hi, Below is my code Socket CSocket,SSocket; sin_ad.sin_family = AF_INET;//sin.sin_family = PF_INET; sin_ad.sin_port = htons((u_short)m_Port); sin_ad.sin_addr.s_addr = INADDR_ANY; int s_len = sizeof(sin_ad); CSocket = accept(SSocket,(struct sockaddr *)&sin_ad, &s_len); ****if (ioctlsocket(CSocket, FIONBIO, &iMode))//iMode is ulong set to 1. { idc_txtbox.put_SelText("Unblocking of Socket failed"); closesocket(ServerSocket); WSACleanup(); }** if (CSocket == INVALID_SOCKET) { …

Member Avatar for anukavi
0
227
Member Avatar for silvercats

1.If cin and cout objects are in the 'iostream' , why do we need to declare it again using 'std' ? 2.are cout,cin,cerr,clog the only ones in the iostream? 3.under which categories do cin,cout and iostream fall? (library,object etc..) 4.can we use the same iostream for both linux and windows? …

Member Avatar for silvercats
0
129
Member Avatar for rebellion346

So I managed to get everything working right except for one thing, when I enter the following input: a = 2 b = 2 c = 2 I should be getting this: Root 1 = -0.5 + 0.866025i Root 2 = -0.5 - 0.866025i But I get this: Root 1 …

Member Avatar for vencen
0
2K
Member Avatar for muhammad.khan.3576

#include <fstream> #include <iostream> using namespace std; char input_1[256]="1.wmv"; char output_1[256]="2.wmv"; char output_2[256]="3.wmv"; void Append() { ofstream write(output_1,ios::binary|ios::app); ifstream read(output_2,ios::binary); read.seekg(0,ios::end); int size_=read.tellg(); read.seekg(0,ios::beg); char* in=new char[size_]; read.read(in,size_); write.write(in,size_); write.close(); read.close(); } void Split(){ int size_; ifstream read(input_1,ios::in|ios::out|ios::binary); if(read.is_open()) { read.seekg(0,ios::end); size_=read.tellg(); const int half=size_/2; read.seekg(0,ios::beg); char* file_content_a=new char [half]; …

Member Avatar for Ancient Dragon
0
219
Member Avatar for amrit_anand

Hey programmers! I am searching for a code and unable to get it. I know this is the best place to ask. Please help me with this file handling code. "How to count the occurrences of a specific string in a text file using c".... Please help as soon as …

Member Avatar for Ancient Dragon
0
145
Member Avatar for new_developer

Hi there, How do we differentiate between NULL and zero in C++. I have a program in which i assign NULL to num variable but if i apply if condition to check whether it is NULL or zero. Program still gives me result zero. //num = 0; num = NULL; …

Member Avatar for Ancient Dragon
0
603
Member Avatar for new_developer

Hi everyone, I am stuck in writing Bank Account program. I want that if user wants to create an account, BankAccount class object is created. Then after this i call to its methods such as getBalance() to get the balance in the account. But its not working and I am …

Member Avatar for nullptr
0
129
Member Avatar for christinetom

Hey... If I just built a library for any open source software for C++, what file type should the library files come in? .a OR .o files? Thank you.

Member Avatar for christinetom
0
191
Member Avatar for ao_py

Hello, I'm a beginner in c++. I'm trying to write a program that simulates the game "Tic Tac Twice" (the game is described below). The program works ok until it's time for my checkForWinner() function to do its job. I can't figure out why it's not working. Any help on …

Member Avatar for luzan
1
798
Member Avatar for silvercats

what is the difference between std::cout<<"dfdfd"<<endl;//everywhere and using namespace std::cin putting above line at the top of the main function and putting the below line at the top of the main using namespace std; and + 2 bonus questions. 1.Are there any other namespaces than 'std' in c++? 2. Are …

Member Avatar for NP-complete
0
189
Member Avatar for teo236

I'm using Eclipse and I made a program that reads ID3 tags. The problem is that each time I run it, it stops in this line: TagFrame * tmpFrame=new TagFrame(frameID,header.getFilename(),stream); bufferLeft-=tmpFrame->getFrameSize(); tmpFrame->readObject(); frames.push_back(tmpFrame); //This line!!! Where the variable 'frames' is a std::list<TagFrame*>. This block of code is beeing called from …

Member Avatar for teo236
0
229
Member Avatar for thendrluca

hi all! :) well i wrote a sample code to test threads and i don't get what i want the problem is that the thread i created is starting directly after i create it? but he must start when my j is equal to 25 and then i joining the …

Member Avatar for thendrluca
0
180
Member Avatar for codeyy

How do I write a recursive function in C++ to display a triangle of * like this using a parameter size (e.g. 4 in the following example): * ** *** **** I am able to write a recursive function to display an inverted triangle like this: **** *** ** * …

Member Avatar for Gonbe
1
3K
Member Avatar for omarking05

Al slam A'lykom .. its kinda freaky to me .. cuz its my first year in c++ ( in fact its few months not even a year ) and i have a project , and its to create an ATM program that asks the user if he is new or …

Member Avatar for omarking05
0
161
Member Avatar for kruschev

void Project1(){ unsigned short int x; bool flag = false; cout << "Enter an interger, I will reversed i.e. 301 --> 103" << endl; cin >> x; if ((x > 0) && (x <= 65535) ){ flag == true; cout << reverse_num(x); cout << endl; } else { cout << …

Member Avatar for nullptr
0
275
Member Avatar for daino

Has anyone ever used PLPLOT. I'm trying to compile one of the examples (which build successfully during the plplot build process) but I want to build the example individually. It's proving very challenging. A million linker errors and no clue on their website as to what is going wrong. I've …

0
155
Member Avatar for jhambe
Member Avatar for rubberman
0
73
Member Avatar for thePAkid

I'm trying to outFile to houseData.txt. I did that fine but now all the data is all on the same line 10 times. What did do wrong in my code? House Price Number ------ ----- 329155000235000 459160000235000 505185000235000 500215000235000 345210000235000 456305000235000 344405000235000 501355000235000 401190000235000 300170000235000 I need it to look …

Member Avatar for azeem abbas
0
156
Member Avatar for ninidesobra

hi guys, i am about a graduate of database management in SQL, but then i wish to study software developemt in C++, can anyone help me locate a good school around the world?

Member Avatar for Reaper Man
0
207

The End.