49,761 Topics
| |
Hello. I'm a newbie and i was wondering if anyone can tell me how to create an array that contains objects and number 0 wherever there is no object. Thanks in advance | |
Hello everyone, I am a C++ newbie and I am running into some linking errors. I am using Vi to compile and link my code. Here are the linking errors: assign6.o: In function `cAccountList::cAccountList()': assign6.cpp:(.text+0x1db): undefined reference to `cAccount::cAccount()' assign6.o: In function `cAccountList::cAccountList()': assign6.cpp:(.text+0x22b): undefined reference to `cAccount::cAccount()' assign6.o: In … | |
Hey everyone I am writing some code for my c++ class and in this program I am trying to sort back account information by there accountID #'s. When I try to compile, here are the errors I get: assign6.cpp: In member function ‘void cAccountList::sort_by_ID()’: assign6.cpp:110: error: ‘accountID’ was not declared … | |
[code] int do_openFile(void) { char *p ; /* pointer to outFileName */ char *m ; /* pointer to report date */ char *mon; /* month number in report date */ /* get output file name */ m = pk->CNCRptdate; m += 2; strncpy(mon, m, 2); p = outFileName ; strcpy(p, … | |
I would like that case 1: should display how many elements do i want, and that i can assign values to those elements. Mine because of the j++ goes infinite, so i can enter infinite values to infinite arrays. How could i do this? Cate elemente vrei sa adaugi: 3 … | |
Every thing works perfectly only it will not check for a full house. Ive tried to figure out what the problem was by rewriting pair checking and three of a kind checking but the same result always. The function simply returns an integer corresponding to the hand stength given a … | |
i need help in making c++ code for tic tac toe on 7x7 board by using mini max and alpha beta where 4 in a row ,column,and diagonal are winning state , if some 1 can share code it will be quite help full 4 me | |
Hello; can we give the variable in struct an initial values ? ex: struct example{ int id; float gpa; string name; }; can we but this inside the structure : int id=34440; the same Q is for the Class ? can we intialize the variable when definr it for the … | |
Hello. I'm new to C++ and I just learned how to use vectors and lists and indices and iterators, but i'm confused about iterators. Mainly, why should I use them instead of indices? They seem to add more complexity to accomplish the same thing as using indices... so could someone … | |
Ok i have a char with ''/afile.html" assigned to it. The extensions of it can vary so i need to get the extension to a seperate char to compare it with something else il show you what i have.... Basically i need everything after the '.' [CODE]char resource[16]; n = … | |
the error by the compiler is [code=text]Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\Makefile.win" all g++.exe Untitled1.o plants.o -o "Project1.exe" -L"C:/Dev-Cpp/lib" Untitled1.o(.text+0x182):Untitled1.cpp: undefined reference to `Plants::Plants()' collect2: ld returned 1 exit status make.exe: *** [Project1.exe] Error 1 Execution terminated[/code] main code is [code]#include <iostream> using std::cout; using … | |
Problem: Write a pgoramthat uses a structure to store the following information: Name, IdNum, Test1Score through Test4Score, average, and grade. function to ask the user for student's name, etc. The average score should be calculated and stored in the Average member of the structure should be calculated in their own … | |
Hello all, great forum that have been a great source of information for me over the past many weeks. So now I decided to join up. I am currently trying to write a partial sum function as part of a much larger program I once wrote in Fortran. I am … | |
Dev cpp gives me the error 18 C:\Dev-Cpp\Untitled1.cpp request for member `setStats' in `plant1', which is of non-class type `Plants ()()' And the same for line 19. Please someone tell me what's wrong. I'm a noob at c++. Thanks in advance. #include <iostream> using std::cout; using std::cin; using std::endl; #include … | |
If we have three classes A,B,C declared as follows: [code=C++] class A{ protected: int x; }; class B : A{ //... }; class C : B{ //... }; [/code] does class C see its member x? It seems to me that it doesn't according to what the compiler says to … | |
Hi! I'm making a graph generator. Most is done but the only problem is that when i'm doing the 2nd or 3rd graph in the same session, the graph collapses . and after the end of execution of the program, i get "Null pointer assignment" I tried debugging but i … | |
Can someone please tell me the difference between Class and Structure in C++ ??? I cant find any..!! Thanks | |
This code you are asked to input a number and it will tell u wheter or not the input you entered is in the array or not i am having issues with this code and its giving me some errors, if anyone wants to help me out it will be … | |
Hello everyone, I'm trying to improve myself on Winsock , so I wrote a code which can get the content of an website.Now I'm trying to post (upload) a file to a http website.Here is my code , what should I add to my code to work with POST? Thanks … | |
i have oop in c++ in some detail but i am not familair with java.please help me to write five sentences in prose or cons of this statement "c++ supports more oop features as compared to jave" please help me | |
[b]Split from - [url]http://www.daniweb.com/forums/thread255859.html[/url][/b] I think I may be in the same class as rwill357 and I am having some problems getting my code correct too. I appreciate the help that you have given so far. I have made the changes that you suggested. I'm not sure where I'm going … | |
I need help with decrypting a 12 character message located in a file named encrypted.txt then printing the decrypted message to the screen and a new file named decrypted.txt. This is what i have so far... and don't understand how to print the char to the screen as a letter … | |
i have a numeric updown that goes from 0-99 and it works but i want to make it continuous so if i hit the down when its at 0 it goes to 99 and when its on 99 and i hit up it goes to zero anyone know the code … | |
Hi gurus, I have a simple question regarding file parsing. I am trying to parse a file and store the fields I require in a multimap. Now I want to pass an array which is of int type and specifies field number to be extracted in a file. I am … | |
im having a difficult time figuring out my last two functions. first one which is the int divelement(int a[], int size); this function is suppose to find and print the elements of my array that are only divisible by 5, so the answer will be like 10,15,90, and 95. i … | |
this is my daughters homework she asked me to help and now im stuck she has worked it out and is making me look stupid need to get my selfrespect back even if i have to cheat(i used my brain and im asking you) the code is as follows but … | |
ok, so i have a simple code below but i need an array function that calculates which elements are divisible by 5 and then its passes the results to the main function and outputs them, any help with code on how to do it will be appreciated? basically the above … | |
Greetings from Greece, this is my first post! I'm having some minor trouble with an application I've been working on the past week. So if you could please shed some light into this. Thank you. The problem I'm having is that when the user is trying to save a file … | |
So I've got this program I made, and I wanted to speed it up, using multithreading, to make use of my quad core. The program itself fully supports multithreading. The problem is, that when I'm running the program, using just one; CreateThread() it finishes in 6seconds, if I run 2 … | |
Hello everyone, I am quite new to C++ and I am currently trying to complete a project in creating a program that solves a maze of a given dimension.The text has to be read in and the first element of the file defines the size of the array,its an integer … |
The End.