49,757 Topics

Member Avatar for
Member Avatar for kleyva

I have to write a program that that reads an array of integer numbers, stores them in array, sort the numbers in ascending order, and print the sorted array: using the buble sort technique. Unfortunately I can't seem to get it to work at all, and I know <stdio.h> is …

Member Avatar for WaltP
0
652
Member Avatar for shawn.reynz
Member Avatar for sfuo
0
93
Member Avatar for Tom_Weston

So, as you can see... [code] #include <iostream> #include <string> using namespace std; int main() { char comma = ','; string str1 = "hello,friend"; string str2 = str1.substr(str1.find(comma)+1, str1.length()); //i guess this line... cout << str2 << endl; system("pause"); return 0; } [/code] What is being output is str2, and …

Member Avatar for gerard4143
0
129
Member Avatar for thepriceisright

I want to write a program that determines the bill for car parking. I asked my friend to put together a description of what I want to do. Can someone look at this and give me a good code to do this? This program requires you to input information about …

Member Avatar for turt2live
-1
1K
Member Avatar for Labdabeta

What does it mean if my opengl objects are opaque from one side and translucent from another?

Member Avatar for Labdabeta
0
86
Member Avatar for Zssffssz

Ok the thing I searched into google brought up a ton of nonsense. I want to use variables from a function in main and (more important) variables from main in a function. I am already using file I/o as a loophole but I want an easier way. PS How do …

Member Avatar for gerard4143
0
169
Member Avatar for Labdabeta

here is the question, what does str(X) become [CODE]#define str_(X) #X #define str(X) str_(X)[/CODE] when X is a string? is it ""string"" or "\"string\""?

Member Avatar for Labdabeta
0
110
Member Avatar for Mona..

Hi everybody.. I have a homework on 2-Dimentional arrays, I have to creat a class and pass the parameters int it, i have to overload operators( +, -, *, << ) how do I Add the matrices?? Subtract?? and Multiply them using operator?? what should I pass and what should …

Member Avatar for Mona..
0
182
Member Avatar for Sunshine2011

Hello, I wrote a little program (Create a vector and give it back via pointer.) for a better understanding of pointers. First it works but when I would like get access to the vector alloacated with "new", problems occur. For example saving a element is not possible. [ICODE] #include <iostream> …

Member Avatar for Fbody
0
232
Member Avatar for hemj

Hi, I have to write a program which makes changes and writes to a different text file. The point at which I am stuck is that I am unable to add the value 10 to ASCII value of each of the first 6 characters in the file. Can someone tell …

Member Avatar for Fbody
0
2K
Member Avatar for linx_mt

Hello, I am so frustrated as I search the internet and cannot find solution for what I want to do... I want my C or C++ code be able to create a file in a directory under "C:\Program Files", for example "C:\Program Files\abc\xyz.txt". This usually triggers a security confirmation like …

Member Avatar for linx_mt
0
297
Member Avatar for Awah Mohamed

Hi guys, how are you all?? I want your help in writing and auto run code. I mean, a code in c++ that auto runs my c++ based applications so that when ever the pc starts, my programs start as well. How can i build it?? I have been programming …

Member Avatar for Awah Mohamed
0
287
Member Avatar for falconmick

I was curious as to why the C++ standards board/the guy who made C++ decided to make all non default constructors non explicit? Stroustrup said that with C you shoot yourself in the foot, but with C++ you blow your foot off... Why didn't they make all non default constructors …

Member Avatar for mike_2000_17
0
816
Member Avatar for JuloF26

Hi guys! I want to start learning Objective-C and Id like to use c++ streams, problem is that it is causing error on this hello world example: [CODE] #import <iostream> #import <windows.h> int main( int argc, const char *argv[] ) { std::cout<<"Hello World"<<std::endl; Sleep(5000); return 0; } [/CODE] and these …

Member Avatar for TPBarnett
0
602
Member Avatar for sunn shine

can any 1 tel me the site , from where i can install this? recently some thing went wrong with my computer and i lost my evry thng... :(

Member Avatar for Narue
0
197
Member Avatar for XodoX

I read that you can use a while loop to read the input from a text file and create a doubly linked list? How do I do that? I would appreciate if someone could show me. Thank you!

Member Avatar for EskayJoe
0
1K
Member Avatar for Zvjezdan23

In my math programming class I have an assignment to find the slope intercept formula (y2 - y1) / (x2 - x1) which is the m of the formula y = mx + b. I have to find 2 slope intercept equations and make an if-statement or multiple if-statements to …

Member Avatar for Fbody
0
310
Member Avatar for lawnmoler

Okey i know that im going to start hate with this thread, but which one should i choose to learn looking from complexity view? Which api is more "easy" or user-frendly to learn? And why so? I wana know what you think.

Member Avatar for Zssffssz
0
93
Member Avatar for ntrncx

I do an exercise and i wrote this code to test templates [CODE]#include <iostream> #include "Date.h" #include "Time.h" using namespace std; template <typename T> bool compare(T first,T second){ if (first==second) return true; else return false; } template <class T,class X> bool compare(T first,X second){ if (first==second) return true; else return …

Member Avatar for ntrncx
0
220
Member Avatar for lAmoebal

I need to create a basic program for work that utilizes the snmpget command. It needs to be usable in both windows and solaris as our clients use both. What's the best snmp library to use? I tried to download a number of them but I can't even get the …

Member Avatar for vijayan121
0
3K
Member Avatar for ratatat

help guys, this code tells me that the sleep identifier is not found. has anyone got an idea on how to resolve this?

Member Avatar for ratatat
0
80
Member Avatar for James19142

in this program i'm writing, i seem to keep getting rounded down values. At first i though it was because i was declaring my return variable as an integer so i made sure i wasnt doing that and changed all number variables in the class to doubles to ensure i …

Member Avatar for Fbody
0
159
Member Avatar for alexander1s

am writing a program that will count the votes for those whom are agree and desagreed, so i would have Yes and no, now i have to have a file in wordpad, in other to import the information that was saved, to make the program to run, but i have …

Member Avatar for James19142
0
125
Member Avatar for Zvjezdan23

This is code for the algebraic slope formula (y2 - y1) / (x2 - x1). I need help. My error is: Uninitialized variable formula2 is being used without being initialized. Can anyone help me??? [CODE]#include <iostream> #include <string> #include <cmath> #include <algorithm> using namespace std; int main() { int formula1[2]; …

Member Avatar for Fbody
0
107
Member Avatar for hiimhenryyy

Hi, This is my first post here at DaniWeb. I've been using it as a resource through out my assignments. I am truly eager to learn C++, but I've gotten stuck. All I am trying to do is average an array of numbers, but I haven't been able to even …

Member Avatar for MonsieurPointer
0
166
Member Avatar for sugantha

hello friends, I am doing a bank management system project where I have to conect a database done in MS Access(.mdb extension) to the C++ code...I ve never learnt much about databases and this is the first time I m using Access...so I d be grateful if anyone could explain …

Member Avatar for Ancient Dragon
0
5K
Member Avatar for mrnobody

Hi guys, Lets say I create a class pointer in my program, do I need to delete the pointer I created before I close the program? Or will the pointer be deleted automatically whenever I exit the program? Will it cause the PC memory to be locked up if I …

Member Avatar for MonsieurPointer
0
86
Member Avatar for terey

[CODE]#include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char ch; do{ cout<<"press Q or q to quit,press any key to continue : "; cin.get(ch); cin.ignore(); if(ch!='Q'&&ch!='q') cout<<" you want to continue?\n"; else cout<<"you press q to quit "; }while(ch!='Q'&&ch!='q'); ; system("pause>NULL"); return 0; }[/CODE] my …

Member Avatar for gyme20
0
92
Member Avatar for anandhan1089

Actually i am doing project in MFC. There i need to get the menu string in the right click context menu .please help me.. I am waiting .. thank you.

0
38
Member Avatar for Labdabeta

I am extremely confused about libraries and have been having trouble understanding them with google. Basically I want to create a library so that I can use a bunch of functions from another file without all of the libraries' contents being seen. EG: library code: [CODE]class test { private: int …

Member Avatar for Labdabeta
0
214

The End.