49,761 Topics

Member Avatar for
Member Avatar for daviddoria

Hi all, I have started a wiki that I hope to make the "unofficial Daniweb wiki". Its mission is to present short, compilable answers to many commonly asked questions here on the forum. [url]http://programmingexamples.net[/url] I have seeded it with a handful of basic operations. Please feel free to edit, add …

Member Avatar for Bench
4
148
Member Avatar for fplgenius

Hello eople i never post anything here because i always find a solution to the problem but this one is out of my range, ok so when i want to start a new cons or Win32 app i go normaly to FILE->NEW->PROJECT and click for example console mode and then …

Member Avatar for Ancient Dragon
0
123
Member Avatar for iamcreasy

I am trying to grab some data after opening a text file with append flag. I am using the following code...but nothing is being printed and program execution is progressing forward. Can anyone point me my mistake... [CODE] fstream outStream("test.txt", ios::app);string testID; cout << "Enter Teacher ID - "; cin …

Member Avatar for iamcreasy
0
308
Member Avatar for Abiha

PPPPPPPLLLLLLLZZZZZZZZZZZ tell me which type of logical error does exist in this program.it evaluate numerical expression correctly but the problem is in alphabetic expressions plz tell me the output of a+b & also of a+b*c/d^e so I'll match my output result with Ur answer Ur replies are not satisfying me …

Member Avatar for Rohitvrma18
-4
140
Member Avatar for bbman

Hey, I have the code: [CODE] Form1(void) { array<Label ^>^ labels = gcnew array<Label ^>(itemCount); InitializeComponent(); for (int i = 0; i < itemCount; i++) { labels[i] = (gcnew Label()); labels[i]->Tag = (int)i; labels[i]->Location = Point(1, (i + 1) * 50); labels[i]->Size = System::Drawing::Size(250, 50); this->Controls->Add(labels[i]); } } [/CODE] This …

Member Avatar for bbman
0
319
Member Avatar for akssps011

Hi I want to write a file shredder in C++. What I know is that I need to overwrite things with 0 but I am not very much clear on this. What concepts should I know to program it ?

Member Avatar for griswolf
0
48
Member Avatar for YasaminKh

Hi Everyone, I'm working in with a file and somewhere in it I'm reading a number that i know it's starting and endig position n the file and then i store it in an string*. But at the end I need to convert this string to the int value. I …

Member Avatar for nbaztec
0
182
Member Avatar for NathanOliver

He all I am currently working a on a problem to convert the entire contents of an STL container into a string. For example if I had this: [code=c++] int foo[] = {1, 2, 3, 4, 5}; vector<int> bar(foo, foo + 5); [/code] I would like to convert [icode]bar[/icode] into …

Member Avatar for Bench
0
126
Member Avatar for sfuo

So far I have written a program that draws text to the screen and I am able to change the font type but I am unable to change the font size. Here are the 3 main parts of my code that I think you need to see. Font structure: [CODE]typedef …

Member Avatar for sfuo
0
325
Member Avatar for romyboy2k9

Hi, I'm having trouble with my program,here is one of the error code: Error 1 error LNK2019: unresolved external symbol "public: __thiscall linkedListType<int>::linkedListType<int>(void)" (??0?$linkedListType@H@@QAE@XZ) referenced in function "public: __thiscall linkedQueueType<int>::linkedQueueType<int>(void)" (??0?$linkedQueueType@H@@QAE@XZ) main.obj Mesina_Wk5Assignment The following are the codes to my program [CODE] // linkedList.h file #ifndef H_LinkedList #define H_LinkedList #include …

Member Avatar for jonsca
0
289
Member Avatar for avarionist

I am trying create a button that when clicked prints hello world in the text box above it. however im a complete noob on winforms. I normally just make console programs any tutorials on winforms ? with C++?

Member Avatar for avarionist
0
171
Member Avatar for andyg55

Hi, I'm trying to create a 2d array that will fill itself up with numbers i have in a text file. My text file looks like this: 1 5 4 2 6 3 3 9 4 4 1 8 5 2 2 So, I want to create an array with …

Member Avatar for tagazin
0
2K
Member Avatar for CanYouHandstand

Hello All I’m trying to hook the mouse scroll wheel using SetWindowsHookEx with WH_MOUSE_LL. The callback function I am using operates correctly, and identifies when the mouse wheel is scrolled. However I am unsure of how to identify which direction the mouse has been scrolled. My code so far: [CODE] …

Member Avatar for CanYouHandstand
0
2K
Member Avatar for God Coder123

if i were to create a program which required the user to enter multiple values, but i do not no how many. How would i go about anticipating the input. For instance if the user were permitted to input any amount of numbers and i wanted to add all the …

Member Avatar for jonsca
0
104
Member Avatar for KAY111

Hi I started a thread earlier back and I thought my problem had been solved but now new errors have popped up Here are the errors I'm getting: bfs.cc: In function 'void greedyMatch()': bfs.cc:9: error: expected primary-expression before 'for' bfs.cc:9: error: expected `)' before 'for' bfs.cc:9: error: 'bfs_ee' was not …

Member Avatar for Taywin
0
2K
Member Avatar for KAY111

Hi guys, I am stuck with this piece of code for a long time. The errors that come are: bfs.cc: In function 'void greedyMatch()': bfs.cc:9: error: expected initializer before '*' token The relevant code is [code=c] #define forallXNodes(u,G) \ for(arc *bfs_ee=(G.getSource())->firstOutArc(),arc *bfs_stopA=(G.getSource())->lastOutArc(),u=bfs_ee->head(); bfs_ee <= bfs_stopA;u = (++bfs_ee)->head()) #define forallYNodes(u,G) \ …

Member Avatar for KAY111
0
1K
Member Avatar for Stefano Mtangoo

Hi again, After a defeat in Linux in other post (which I'm still finding a way), I have decided to give a shot in windows. However it produces DLL fine and I can use LoadLibrary(). I need it to produce .a file for static linking. How do i do it? …

Member Avatar for Stefano Mtangoo
0
255
Member Avatar for bbman

Hey, I have just switched from C#, and in C# there was a way you could create an item (Example), and set parameters. [CODE] Example text = new Example(); Example.parameter = value; //etc [/CODE] I have searched the internet, and could not make any sense of it. Any help would …

Member Avatar for Fbody
0
121
Member Avatar for dansnyderECE

I'm trying to convert a disassembled Hex Dump to a SPIM friendly assembly file. This requires that I take lines like: [CODE] 004000f8 <_init>: 4000f8: 27bdffe8 addiu sp,sp,-24 4000fc: afbf0010 sw ra,16(sp) 400100: 0c100064 jal 400190 <call_gmon_start> 400104: 00000000 nop 400108: 0c100094 jal 400250 <frame_dummy> ... [/CODE] and make them: …

Member Avatar for nbaztec
0
145
Member Avatar for dansnyderECE

Is there a good way to determine the end of a a line in a text file? I need to find of end of a line in text because all text lines are of different length. I also have to store each word (separated by spaces) into a vector. [CODE] …

Member Avatar for nbaztec
0
245
Member Avatar for anu07

A question has been knocking my mind today,is it possible to convert a executable file back to its source code in c++??

Member Avatar for anu07
0
111
Member Avatar for YasaminKh

Hi everyone, Somewhere in my need i need to create strings like ( x,y,z ) with 0<x,y,z<N. I was trying to use 3 for loops but it didn't work. That's what i wrote: for(int i=0;i<N;i++){ for(int j=0;j<N;j++){ for(int k=0;k<N;k++){ string t="( "; t+=i; t+=","; t+=j; t+=","; t+=k; t+=" )"; } …

Member Avatar for YasaminKh
0
188
Member Avatar for mod666

hi! i have a class from which other classes are inhertited. I then create a function GetInput() & I want it to funtion for evry object inherited by MAIN. I don't want to create separate functions for each. Is there any way for it? Thank you.

Member Avatar for Fbody
0
108
Member Avatar for altXerror

i have a Header file that i will be using for multiple programs. this file specifies integers (its for my calculator programs). is it possible to have an integer value represented as AB if the two other integers are represented as A & B without getting a compiling error? EX. …

Member Avatar for mrnutty
0
154
Member Avatar for merse
Member Avatar for AkashL

This problem originates from a job interview which could be solved in C++ or C#. As far as I can remember it was to implement a queue that can be added to by multiple threads and accessed by multiple threads. I haven't tried it in C# yet although I think …

Member Avatar for Radical Edward
0
234
Member Avatar for DelilahDemented

I'm working on a problem where I am trying to validate the user input to verify only digits have been used. I'm trying to use the ASCII code to do so, but I'm stuck. I would greatly appreciate any help that can be provided. Thank you in advance!!! *Delilah* [CODE]#include …

Member Avatar for Taywin
0
2K
Member Avatar for neknek

I downloaded OpenCV last Wednesday and tried to link it with DevC++ I followed the instructions found [URL="http://www.cypax.net/tutorials/opencv/index?language=en"]here[/URL] and I get the error cannot find -lhighgui ld returned 1 exit status I'm sure the code that I tried to compile is working because I previously compiled and ran that code …

Member Avatar for neknek
0
171
Member Avatar for bklearner

code not working [code=c++] #include<iostream> using namespace std; typedef struct node{ int data; struct node *next; struct node *previous; }mynode; mynode *head,*temp,*current,*tail; void add(int data); int main() { head=NULL; tail=NULL; add(1); cout<<"added 1"<<endl; add(2); add(3); add(4); } void add(int data) { temp=(mynode*)malloc(sizeof(mynode)); temp->next=NULL; temp->previous=NULL; if(head == NULL) { head=temp; tail …

Member Avatar for Taywin
0
147
Member Avatar for Galdzor

Hello I just started programming and managed to make some programs, but what I don't get is when I get these errors: Compiler: Default compiler Executing gcc.exe... gcc.exe "D:\Documents and Settings\Riikard\Desktop\Untitled1.c" -o "D:\Documents and Settings\Riikard\Desktop\Untitled1.exe" -g3 -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -g3 D:\Documents and Settings\Riikard\Desktop\Untitled1.c:1:20: iostream: No such file or directory D:\Documents and …

Member Avatar for nbaztec
0
108

The End.