49,761 Topics

Member Avatar for
Member Avatar for Allophyl

I have the line [code=c++]#include <algorithm>[/code] at the top of a file, and the line [code=c++]nth_element(minRollArray,minRollArray+n,minRollArray+numSets);[/code] in one of the fuctions in that file. However, when I try to compile it I get the error error C3861: 'nth_element': identifier not found at that line. I would expect this if I …

Member Avatar for Allophyl
0
538
Member Avatar for winecoding

There is a small program. [CODE]#include <stdio.h> void f(char **p); int main() { char *argv[]={"ab", "cd", "ef", "gh"}; f(argv); } void f(char **p) { char *t; t=(p+=sizeof(int))[-1]; printf("%s\n", t); }[/CODE] Assume the size of int is 4, I was asked to give the running result of the following code segment. …

Member Avatar for burgercho
0
91
Member Avatar for nbaztec

Basically, I didn't know where to put this so I choose the Super of the 2 Languages. Our lecturer gave us an assignment to lay out diff. b/w C & C++, which started with a rather dirty spurge of concepts. He stated: In C program , the MAIN() should NOT …

Member Avatar for mrnutty
0
531
Member Avatar for posche

codes for ice cream inventory system using borland c++ or c.. any reply is totally a BIG HELP!please please..

Member Avatar for posche
-3
91
Member Avatar for PixelExchange

Hello everyone. I already know the C code required to use SQL statements within C++. Using mysql_real_connect, I was able to establish a connection to a remote MySQL server. The problem is, even though mysql_real_connect did not RETURN NULL, (meaning that a connection to the mysql server was established) I …

Member Avatar for PixelExchange
0
215
Member Avatar for potato4610

How can I get the respondent to terminate my survey before all respondents have entered? That respondent may enter a specific number of out of range responses in a row. Below is my code: [CODE] #include <iostream> #include <cctype> using namespace std; const int STUDENTS = 10; // students entering …

0
76
Member Avatar for chandini.david

Hey all! Here's my code: mm.cc: [CODE] int compute(int f, int c) { return f + c; } [/CODE] mm.h: [CODE] #ifndef MM_H #define MM_H int compute(int f, int c); #endif [/CODE] main.cc: [CODE] #include <stdio.h> #include "mm.h" int main() { int a; a = compute(10, 4); printf("Output: %d\n", a); …

Member Avatar for chandini.david
0
117
Member Avatar for qqwushi12345

Write a program that reads in a positive integer N and calculates and displays the sum of the first N even integers. For example if N is 6, the program should display the value 42, which is: 2+4+6+8+10+12=42. Caution: You need to write a program to do the addition. If …

Member Avatar for Allophyl
-1
1K
Member Avatar for wioneo

I have been using c++ for a short time now and wanted to add sounds support via the OpenAL library, but I am having problems. In the end I tried to directly copy the code from a tutorial, but it is still not working. I have... [CODE]alutInit(&argc, argv); alGetError(); //////////////////// …

0
29
Member Avatar for qqwushi12345

Can any body tell me what the below code does? The code is written in C++ language. ------------------------------------------------------------------------------------- [CODE]#include <stdio.h> #include "genlib.h" #include "simpio.h" main(){ int num1, num2, temp; printf (“Enter a positive integer: \n”); num1=GetInteger(); printf (“Enter a positive integer: \n”); num2=GetInteger(); while (TRUE){ temp=num1%num2; if (temp==0) break; num1=num2; …

Member Avatar for Allophyl
-1
99
Member Avatar for dfcrackhead

I am trying to write a program that will read values from spreadsheets and stuff and I know I need to use CSV files instead of Excel files and stuff, but say I want to just read a single entry at a specific coordinate how do I access that one …

Member Avatar for iamthwee
0
309
Member Avatar for sa3eed7511

please i need fast answer about this i want to make Table but i guess i do something wrong can anyone tell me what the wrong i have done it [code]#include<iostream> #include<conio.h> using namespace std; void main() { char t=[3][3]; if (t[1][1]=x) cout >> t[1][2]=o; getchar();[/code] thanks very match :)

Member Avatar for cgcgames
0
86
Member Avatar for Nandu Das

I was copying a c++ program and i came tosee something like this: char a[10][10]= {....} What does a[10][10] means?? what does the symbol [] do? Pls help me...

Member Avatar for aman rathi
0
116
Member Avatar for LevyDee

Hi, Im working on a desktop utility program, and right now Im adding functionality to launch exe's from it. My question is, are there any simple methods to launch an app using the windows library? Thanks.

0
51
Member Avatar for Lukezzz

Hi.. I will make a "release" of a project I have done in VC++ 2008 Express Edition. I go to: Project/Form1 properties. Here I choose: Configuration: Release In the General tab, I choose: Output Directory C:\Release & Intermediate Directory: C:\Release. In Debugging tab I choose: Command: C:\Release Now I press …

Member Avatar for Lukezzz
0
731
Member Avatar for fire_

Hello. I'm trying to write a program witch asks you to write delay and then counts time left. But it's not working how it should. If i write number 9 or less it's working fine. But if i write number 10 or more it prints numbers wrong, ex. ir write …

Member Avatar for caut_baia
0
113
Member Avatar for Shikhin

Hi All, I am a newbie and am traking a course in Aptech for C++. Now my instructor asked me to make a program to create, display and insert nodes in a circular link list. I have made the following code: [CODE]#include "stdafx.h" #include <iostream> #include <stdio.h> #include <new> class …

Member Avatar for Shikhin
0
179
Member Avatar for helpingdeed

[B]using c++ is there any way to cout<<"plz help"<<endl; // only when the space bar is press not enter [/B]

Member Avatar for Duoas
0
115
Member Avatar for drjay1627

Hello, Is there any way of checking all elements in a queue without calling pop(). [code] while(!q.empty()){ cout << q.front() << endl; q.pop() } [/code] this is essentially what I have done. There is a bug in my program and I'm trying to check what is wrong. I don't want …

Member Avatar for vijayan121
0
126
Member Avatar for sksingh73

I am writing a client-server program in c++ in linux. I want a functionality in my server that when server is waiting for some response from client, it should not wait indefinitely. But if no response is received say within 30 secs from client, it should disconnect the client. Is …

Member Avatar for vijayan121
0
89
Member Avatar for NicAx64

hi, I am using mingw32-gcc-3.4.2 inside a windows XP Professional SP3 computer. For my project I uses libcomctrl32.a library.The compilation goes without an error. and linking too.But the problem is it crashed on the runtime.Then I add the -g option and debug it. Here is the stack trace that I've …

0
111
Member Avatar for kirennian

Take for example, the number 74.38145. The user inputs how many decimal points they wish to have displayed via the sprintf_s function. I can't for the life of me figure out how to best do this. I know how to display the float to a set number of decimal points: …

Member Avatar for kirennian
0
282
Member Avatar for shoebansari

I'm a 12th grader.. I made a user defined(about 12 functions) c++ program about the working of bank ATM's... Now i want to convert the user defined program to data file such as "ATM.DAT". is there any way out, and please remember that i use only [B]two [/B]file commands - …

Member Avatar for Rashakil Fol
0
62
Member Avatar for dexter1984

[CODE=cpp] while (j < i) { cin.ignore(); cout << "Please type enter to display: "; cin >> enter2; if (strcmp(enter, enter2) == 0) { cout << "ID: " << students[j].ID << endl; cout << "Name: " <<students[j].name << endl; cout << "Address: " <<students[j].address << endl; cout << "Telephone: " …

Member Avatar for ponce_jelie31
0
85
Member Avatar for gaurav_13191

I have a problem in which we are given 2 sets A and B and we have to find set C which contains elements common to A and B.The set A and B can contain duplicates and set C is expected to contain distinct elements(i.e no repetition of the same …

Member Avatar for Rashakil Fol
0
134
Member Avatar for Kanoisa

Hi guys I had an idea for a fun project i would like to try, but i really have no idea where to start reading about the api's data formats and the likes. [U]What i want to do[/U] I would like to make an application as the start of an …

0
57
Member Avatar for Garrett2011

Suppose we've got two integer and character variables: [CODE]int adad=12345; char character;[/CODE] Assuming we're discussing a platform in which, length of an integer variable is longer than or equal to three bytes, I want to access third byte of this integer and put it in the character variable, with that …

Member Avatar for r.evrard
0
210
Member Avatar for rtllz

hi, i was wondering if someone could help me make a number generator. By that i mean have it start from 0 then go 00 then 000 and so on until lets five zeros(00000) and after that make it change the last number by 1. Any help would be appreciated, …

Member Avatar for mrnutty
0
122
Member Avatar for qqwushi12345
Member Avatar for therobot

I've got a small project that I'm working on, and the core *.exe that I'm building has a decent amount of dependancies. I keep this, right now, in a folder of all the includes and a *.lib file for all the implementations. My question is, is there a way to …

Member Avatar for Ancient Dragon
0
87

The End.